SharePoint Online: Check If a Folder has Unique Permissions

Requirement: Check If a Folder has Unique Permissions in SharePoint Online using PowerShell. How to check if a Folder has Unique Permissions? By default, a new folder will have permissions inherited from its parent folder or library. Checking if a folder has unique permissions in SharePoint Online can be done by following…

Read more

SharePoint Online: Change Regional Settings using PowerShell

Requirement: Change regional settings in SharePoint Online using PowerShell. How to Change Regional Settings in SharePoint Online? By default, the regional settings are selected from Site creation Settings in the SharePoint Admin Center at the time of site creation. However, you may need to change these settings depending on your location or…

Read more

SharePoint Online: Fix “The remote server returned an error (401) Unauthorized” Error in PowerShell

Problem: Exception calling “ExecuteQuery” with “0” argument(s): “The remote server returned an error (401) Unauthorized.” Error in SharePoint Online PowerShell script. Troubleshooting Checklist: When working with SharePoint Online using PowerShell, you may encounter the error “The remote server returned an error (401) Unauthorized.” This error can occur when the script is not…

Read more

SharePoint Online: PowerShell to Break Folder Permission Inheritance

Requirement: Break Permission Inheritance of a Folder in SharePoint Online using PowerShell. How to break the inheritance of a folder in SharePoint Online? By default, folders in SharePoint Online inherit permission from their parent objects, such as document library or list. In some cases, you might want to give users different permissions…

Read more

SharePoint Online: CAML Query with IsNull and IsNotNull Examples in PowerShell

Requirement: Get all items from a list where a particular filed value is Null. SharePoint Online: CAML Query IsNull Example Here is the example of how the IsNull operator can be used in CAML: SharePoint Online: CAML query with IsNotNull Operator in PowerShell Similarly, You can use “<IsNotNull>” Operator to get list…

Read more

SharePoint Online: Change from Classic Experience to Modern (and vice versa) using PowerShell

Requirement: Change SharePoint Online site from Classic Experience to Modern. How to Activate the Modern Experience from Classic? The modern experience in SharePoint Online lists and libraries is faster, mobile-friendly, and easier to use. It brings new functionalities, user interfaces, and components. However, some features can only be used in the classic experience….

Read more

SharePoint Online: Error Handling with Try Catch in PowerShell

One of the best practices while writing PowerShell scripting is handling potential errors to ensure the smooth execution of the script when something goes wrong. Who can guarantee a script can run correctly in different environments every time? Error handling in PowerShell is made easy with try-catch blocks similar to .NET framework….

Read more

SharePoint Online: How to Disable “Delete this list”?

Requirement: Disable the “Delete” option in a SharePoint Online List or Document Library. How to Disable the Delete option for a List or Library in SharePoint Online? We have a requirement to disable any accidental deletes on specific SharePoint Online lists and document libraries that are provisioned as part of a custom…

Read more

SharePoint Online: Get Attachments Report in a List using PowerShell

Requirement: Generate a Report to get an Inventory of all Attachments in a SharePoint Online List. PowerShell to Get All Attachments in a SharePoint Online List This blog post will show you how to get all of the attachments from a SharePoint Online list. This is a handy trick if you need…

Read more

SharePoint Online: Get List Experience Settings using PowerShell

Requirement: Get List Experience Settings in SharePoint Online using PowerShell. How to Get SharePoint Online List Experience? Do you ever need to know the list experience settings applied in a SharePoint Online site? Maybe you’re troubleshooting an issue and had to confirm that the setting is configured as expected. Or, perhaps you’re…

Read more