New answers tagged

0

Try if this works: Install-Module importexcel If it works, then after that you can use export-excel command.


0

Please refer to the following steps: Log in the Microsoft 365 compliance center Go to Reports page from the left navigation find Rentention label usage -> Show more Select the label you want to check in the Labels list -> Explore items Select Items with this label and location name in the upcoming page, label usage will be displayed on right. ...


0

Since no one seems to know a solution, I ended up with a workaround for my big files history problem. Surprisingly, although the big files versions can't be reached, they can be completely erased. write-host -f Cyan "`t`tDeleting ALL versions..." -NoNewline $File.Versions.DeleteAll() try { Invoke-PnPQuery Write-Host -f Green " ...


1

This error occurs when you are trying to run the script against a Team site. Only communication sites can become home sites. Quote: Use this cmdlet to set a SharePoint Site as a Home Site. A home site is a communication site that you create and set as the top landing page for all users in your intranet. For more information, see Set up a home site for your ...


3

Disabling Access Request Settings would help you to Disallow members to share and invite others to this site, Disallow access requests to unauthorized members. Limit some SharePoint sharing functionality for specific members. But, it's not considered a solution to hide or disable the “Shared With” or the “Share” Menu Item for all users. Instead, you should ...


0

Matiur's answer was correct. I was in fact connecting to the tenant/admin page instead of the correctg subpage. Thank you.


0

Try to use css to prohibit these two buttons from being clickable: <style> #Ribbon.Library.Settings.LibraryPermissions-Large,#ID_Share{ pointer-events: none; } </style>


1

1.Azure Automation is an option for you to execute PowerShell script at a specified time. 2.You could schedule your PowerShell script by using task scheduler. References: How to run Powershell script on Sharepoint Online at 9 o'clock P.M Task Scheduler for developers How To Automatically Run PowerShell Scripts at a Scheduled Time


1

If you are running the PowerShell from a Windows machine then you can use Windows Task Scheduler to schedule the running of your PowerShell script. To run the PowerShell script from a cloud environment, you could run the PowerShell using an Azure function which can either be on a schedule or triggered via Power Automate.


0

As Mohamed said, you could add a judgment statement to avoid the null value exception, and you need to re-assign the modified value to item. foreach($Item in $spList.Items) { $oldurl = New-Object Microsoft.SharePoint.SPFieldUrlValue($Item["INUM"]) if ($oldur -ne $null) { $oldurl.URL = $oldurl.URL.Replace("T9", "DR") Write-...


0

Looks like the $Item["INUM"] doesn't have a value at the first retrived item, so the $oldurl is NULL! and you can't use the replace function with a NULL string So you should check if the $oldurl is not null before calling the replace function as the following: foreach($Item in $spList.Items) { $oldurl = New-Object Microsoft.SharePoint.Client....


0

Did you check the contents of your web server extension files? I had that same error. Turns out I actually didn't have the assembly ...taxonomy.dll file in the folder. Once I installed the appropriate module, ensured I was referring the correct folder it worked very satisfyingly.


0

In addition to above, a best practice is not to use a single user as groups owner but instead use the Owners group as owner of all groups, so -Owner $ownerGroup


1

Still you can use PowerShell script to do so. You can try this one:https://github.com/chrisdee/Scripts/blob/master/PowerShell/Working/SharePoint/SharePoint2013/SP2013GetWebAnalyticsReport.ps1 And if PowerShell is not your only option, in fact we can get such usage data directly through UI. The popularity trends and usage reports are available in site ...


1

The <Where> clause is missing in your Query! Also, make sure that the data type of the field Date is DateTime. <View> <Query> <Where> <Eq> <FieldRef Name='Date'/> <Value Type='DateTime'><Today /></Value> </Eq> </Where> </Query> </View> You can also use ...


1

As a workaround, you could do the loop like this: $List = $Ctx.Web.Lists.GetByTitle($ListName) $Ctx.Load($List) $Ctx.ExecuteQuery() #Define Query to get List Items in batch $Query = New-Object Microsoft.SharePoint.Client.CamlQuery $Query.ViewXml = @" <View Scope='RecursiveAll'> <Query> <...


1

Get-PnPUnifiedAuditLog command requires ActivityFeed.Read permissions to get unified audit logs from the Office 365 Management API. Follow this steps: Create an Azure AD app registration for the Office 365 Management API Connect to SharePoint using Connect-PnPOnline command, something like below: Connect-PnPOnline -Url https://contoso.sharepoint.com -...


1

You can write the sites in a CSV file and import it using Import-CSV -Path C:\SiteURLs.csv And the loop should look like: Import-Csv "C:\SiteURLs.csv" | Foreach-Object { Add-SPOTopNavigationLink -SiteURL $_ -Title "Support Center" -URL "/" Add-SPOTopNavigationLink -SiteURL $_ -ParentNodeTitle "Support Center" -...


1

Your code should be like: $sourceWebURL = "<Site URL>" $sourceListName = "<List Name>" $spSourceWeb = Get-SPWeb $sourceWebURL $spSourceList = $spSourceWeb.Lists[$sourceListName] $spSourceItems = $spSourceList.Items | where {$_['Category'] -eq "A"} $spSourceItems | ForEach-Object { $_['Category'] = "B" ...


1

I think for your requirement, you can go with the megamenu and hub site configuration. What is Megamenu Navigation? The much-awaited megamenu navigation was recently launched by Microsoft (February & March 2019). It addresses many issues that users have been facing over the last several years in the traditional drop-down navigation approach. One of the ...


1

Try below PowerShell. Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue #Function to retrieve Permission data Function Get-PermissionInfo([String]$UserID, [Microsoft.SharePoint.SPSecurableObject]$Object) { #Object Array to hold Permission data $PermissionDataCollection = @() #Determine the given Object type and ...


0

I could not reproduce your issue: Add-Type -Path "C:\Program Files\Common Files\microsoft shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.dll" Add-Type -Path "C:\Program Files\Common Files\microsoft shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.Runtime.dll" $SiteUrl = "https://contoso....


0

I understand you want to check in all check-out files under a library, you may have a try below cmdlets: function CheckInDocument([string]$url) { $spWeb = Get-SPWeb $url $getFolder = $spWeb.GetFolder("Test lib") $getFolder.Files | Where { $_.CheckOutStatus -ne "None" } | ForEach { Write-...


Top 50 recent answers are included