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

June 30, 2019    , ,
Problem: When trying to run a PowerShell cmdlet, got this error message: "The requested operation is part of an experimental feature that is not supported in the current environment." If a new feature is not yet rolled out for your tenant, SharePoint shows this error. Solution: Se…

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

June 30, 2019    , ,
Problem: When trying to connect to SharePoint Online through PowerShell script, 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'" …

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.

June 29, 2019    , , ,
Problem: When trying to run a PowerShell script for SharePoint Online, 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 in…

SharePoint Online: Check If a Folder has Unique Permissions

June 26, 2019    , , , , ,
Requirement: Check If a Folder has Unique Permissions in SharePoint Online using PowerShell Check if Folder has Broken Permission Inheritance using PowerShell CSOM Import-Module Microsoft.Online.SharePoint.PowerShell -DisableNameChecking #Variables $SiteURL = "https://crescent.sharepoi…

SharePoint Online: How to Get All Modern Group Sites using PowerShell?

June 26, 2019    , , ,
Requirement: Get Modern Group Team sites in SharePoint Online. How to Get All Modern Group Sites in SharePoint Online? In the modern admin center, you can filter sites by its template. Just mouse over to the template column and filter template based on your requirement. We can get the list…

SharePoint Online: Change List or Document Library Icon using PowerShell

June 19, 2019    , , , ,
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 certain document library icons are broken - These document libra…

How to Restore OneDrive For Business Site from Recycle Bin?

June 19, 2019    , , , ,
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 its deleted. When a OneDrive site for an Office 365 user is deleted, it is moved to the tenant recycl…

Migrate SharePoint 2010 Document Libraries to SharePoint Online using PowerShell

June 16, 2019    , , , , , ,
Requirement: Migrate Document Libraries from SharePoint 2010 to SharePoint Online. How to Migrate SharePoint 2010 Document Libraries to SharePoint Online? The idea is: Export all document libraries from SharePoint On-premises to local drive, export metadata of each document to a CSV file and t…

Get All SharePoint Online Administrators in Office 365 using PowerShell

June 15, 2019    , , ,
Requirement: Get a list of All users with SharePoint Online Administrator Role. How to Get All SharePoint Online Administrators in Office 365? To view all existing SharePoint admins, do the following: Login to Microsoft Admin Center https://admin.microsoft.com Click on "Show All"…

How to Create a Log File in PowerShell Script?

June 11, 2019    
Requirement: Generate a log file and add messages to it to track the execution of a PowerShell script How to Create a Log File in PowerShell? We may need to log messages to help us troubleshooting where and what went wrong during the execution of the script. Sometimes, for tracking purposes. …

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

June 05, 2019    , , ,
Problem: Exception calling "ExecuteQuery" with "0" argument(s): "The remote server returned an error (401) Unauthorized." Error in SharePoint Online PowerShell script. Troubleshooting Checklist: Here are the various root causes and solutions for this issue: 1…

SharePoint Online: Apply Theme using PnP Provisioning Template PowerShell

June 04, 2019    , , , , ,
Requirement: Set Theme in SharePoint Online Site using PnP PowerShell Provisioning Template. How to Change the Site Theme in SharePoint Online using PnP Provisioning Template? Go to PnP Provisioning Schema repository in GitHub and build your provisioning template. https://github.com/SharePoint…

Set Footer in SharePoint Online Communication Site using PowerShell

June 02, 2019    , , , ,
Requirement: Set Footer in SharePoint Online Communication Site using PnP PowerShell How to Provision Footer links in SharePoint Online using PnP Provisioning Template? Go to PnP Provisioning Schema repository in GitHub and build your provisioning template. https://github.com/SharePoint/PnP-Pr…

SharePoint Online: PowerShell to Break Folder Permission Inheritance

June 01, 2019    , , , ,
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 inherits permission from its parent object such as document library or list. When you have to pro…

Powered by Blogger.