Fix “List cannot be deleted while on hold or retention policy” Error on SharePoint Online

Problem:  When trying to delete a document library in SharePoint Online, it gave an error message “list cannot be deleted while on hold or retention policy.” Solution: As the error message says: List cannot be deleted while on hold or retention policy, this error is due to the site is under hold…

Read more

SharePoint Online: Set Active Directory Security Group as Site Collection Administrator using PowerShell

Requirement: Add active directory security group to SharePoint online site collection administrator group. PowerShell to Add AD Security group as Site Collection Administrator: Step 1: Get AD Security Group’s ID We need the ID of the AD group first. Use the PowerShell script to retrieve the ID, make sure you have Azure…

Read more

SharePoint Online: Get Document Library Inventory (Folder-SubFolder-File Structure) using PowerShell

Requirement: Get the file-folder structure of a SharePoint document library and export to CSV. SharePoint Online: PowerShell to get the Document Library Inventory Let’s export all folders, sub-folders, and files structure from a SharePoint Online document library to a CSV file: Get File-Folder Structure in a Document Library using PnP PowerShell Similarly,…

Read more

Fix “Get-PnPListItem : The attempted operation is prohibited because it exceeds the list view threshold enforced by the administrator.” Error

Problem: When trying to get list items from a SharePoint Online list using Get-PnPListItem cmdlet with a query parameter, got an error message “Get-PnPListItem : The attempted operation is prohibited because it exceeds the list view threshold enforced by the administrator.” Root Cause:  The requirement was to get all list items created 90…

Read more

SharePoint Online: How to Change Site Theme using PowerShell?

In SharePoint Online you can customize the look and feel of your site by changing themes to reflect your corporate branding. A theme in SharePoint Online defines the colors, fonts, image, and page layout for the SharePoint sites. SharePoint provides a default set of site themes,  and we also have the ability…

Read more

SharePoint Online: Enable Document ID Service using PowerShell

Document ID Service feature automatically assigns a unique ID to documents uploaded which helps to track and manage documents easily. Configuring document ID service is explained in my other post How to Configure Document ID Service Feature in SharePoint Online? Let’s see how to enable document ID service using PowerShell: Step 1:…

Read more

How to Search SharePoint Online using PnP PowerShell?

Requirement: Run Search Query in SharePoint Online using PowerShell How to Search SharePoint Online using PowerShell? Using Keyword query to execute search and export results to CSV with CSOM is explained in my other post: How to Search SharePoint Online using PowerShell-Keyword Query?, Now, I need to get the List Item ID of the…

Read more

SharePoint Online: How to Implement Custom 404 Page Not Found Error Page?

Requirement: Implement a custom page not found error page in SharePoint Online. SharePoint Online: How to Add custom 404 page not found error page SharePoint Online comes with a default “Page not found” error page in “Pages” library in publishing Sites (http://crescent.sharepoint.com/Pages/PageNotFoundError.aspx) which works automatically when a user hits a non-existent URL….

Read more

SharePoint Online: How to Add a Custom Refiner to Refinement Panel in Search Results?

Requirement: Create Search Refiners in SharePoint Online. How to add a Custom Column in Search Refiner in SharePoint Online? Refinement Web Part in SharePoint Online search results page helps us to narrow down the search results. By default, the refinement panel has Result type, Author, and Modified Date columns in it. In…

Read more