Posts

Showing posts from December, 2020

SharePoint Online : Get List settings properties using PowerShelll

Image
  Requirement : Loop through all subsite and site collection to get list settings properties. ********************************************************************************************************************** ####################################################################################### $Username = "ABC@domain-name.com" $Password = ConvertTo-SecureString -String "*******" -AsPlainText -Force $Credentials = New-Object System.Management.Automation.PSCredential ($Username, $Password) $targetWeb = "https://abc.sharepoint.com/sites/sitecollection" ## URL of the site you are uploading to $clientid = "abc-abc-abc-abc-abc" #Add client id of site $clientsecret = "abcdefghijklmnopq=" #Add client secret of site ######################################################################################### try { Connect-PnPOnline -Url $targetWeb -AppId $clientid -AppSecret $clientsecret Write-Host "Connection to site established:...

Exclude lists in search result from sites and subsites in SharePoint using PowerShell

Requirement :  Loop Through All Subsites in a Site Collection using PowerShell and exclude lists from search results (set property NoCrawl = True) Manual approach to exclude lists from search index: List Settings -> Advanced Settings -> set 'Allow items from this document library to appear in search results' to No PowerShell Script to Iterate Through All Subsites in a Site Collection in SharePoint Online: ***************************************************************************************************************************** ####################################################################################### $Username = "ABC@domain-name.com" $Password = ConvertTo-SecureString -String "*******" -AsPlainText -Force $Credentials = New-Object System.Management.Automation.PSCredential ($Username, $Password) $targetWeb = "https://abc.sharepoint.com/sites/sitecollection" ## URL of the site you are uploading to $clientid = "abc-abc-abc-ab...