Fix “The requested operation is part of an experimental feature that is not supported in the current environment.” Error

Problem: When trying to run a PowerShell cmdlet, I got this error message: “The requested operation is part of an experimental feature that is not supported in the current environment.” SharePoint shows this error if a new feature is not yet rolled out for your tenant. Solution: The error can occur when…

Read more

Fix “Cannot contact web site ‘https://tenant-admin.sharepoint.com/’ or the web site does not support SharePoint Online credentials. The response status code is ‘Unauthorized'” Error

Problem: When trying to connect to SharePoint Online through PowerShell script, I got this error message “Cannot contact web site ‘https://crescent-admin.sharepoint.com/’ or the web site does not support SharePoint Online credentials. The response status code is ‘Unauthorized’” I tried running a CSOM script and got an error: “Exception calling “ExecuteQuery” with “0”…

Read more

Connect-PnPOnline : The term ‘Connect-PnPOnline’ is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

Problem: When trying to run a PowerShell script for SharePoint Online, using “Connect-PnPOnline -Url https://tenant.sharepoint.com -Credentials (Get-Credential)”, I got this error message:“Connect-PnPOnline : The term ‘Connect-PnPOnline’ is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was…

Read more

SharePoint Online: Add Calendar Item using PowerShell

Requirement: Add Calendar event in SharePoint Online using PowerShell. PowerShell to Add New Item in SharePoint Online Calendar PowerShell is a powerful scripting language that can automate many tasks in SharePoint Online. Let’s add events to the SharePoint Online calendar using PowerShell: To Set “All Day Event”, set flag “fAllDayEvent” = $true;…

Read more

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: How to Get All Modern Group Sites using PowerShell?

Requirement: Get Modern Group Team sites in SharePoint Online. How to Get All Modern Group Sites in SharePoint Online? Microsoft 365 Group-Connected Modern sites in SharePoint Online offer a modern, responsive design and a wide range of functionalities. This guide will show you how to get all modern sites from the SharePoint…

Read more

SharePoint Online: Get Admin Center Site URL

Requirement: Find the SharePoint Online Admin Center URL. How to Access the SharePoint Online Admin Center? We need the SharePoint admin site URL to manage the SharePoint Online environment and work with SharePoint Online PowerShell modules. How to find the SharePoint Online tenant admin URL? Typically, the admin center is located at:…

Read more

SharePoint Online: URL Length Limitation of 218 Characters in Excel Files

Problem: When trying to open a Microsoft Excel file stored in a SharePoint Online document library, I got this error message: We couldn’t open that file. Rename the file to use a shorter name or copy it to a different folder with a shorter path. We faced similar issues like: “Sorry, we…

Read more

SharePoint Online: Change List or Document Library Icon using PowerShell

Problem: Icon for document library is broken in SharePoint Online after migration. How to Fix Broken Icon for SharePoint Online List or Document Library? After migrating from SharePoint On-premises to SharePoint Online, we found specific document library icons are broken – These document libraries were provisioned through a custom application and have…

Read more

How to Restore OneDrive For Business Site from Recycle Bin?

Requirement: Restore a Deleted OneDrive Site. How to restore a OneDrive for Business Site using PowerShell? When you remove a user from Office 365, his OneDrive is retained for 30 days, and then it’s deleted. When a OneDrive site for an Office 365 user is deleted, it is moved to the tenant…

Read more