SharePoint Online: Copy Folder Structure between Document Libraries using PowerShell

Requirement: Copy Folder Structure between document libraries in SharePoint Online PowerShell to Copy Folder Structure between SharePoint Online Document Libraries: Ever wanted to clone a folder, sub-folder structure between two SharePoint Online document libraries? Well, here is the PowerShell script to copy folder structure from one document library to another. This script…

Read more

SharePoint Online: Upload Folder Structure using PowerShell

Requirement: Upload folder structure to SharePoint Online using PowerShell PowerShell to Upload Folder Structure to SharePoint Online: I just had to clone a folder structure from a local drive to SharePoint Online. Here is the PowerShell to upload a folder structure from the local drive to the SharePoint Online document library: This…

Read more

SharePoint Online: PowerShell to Get Content Type

Requirement: Get Content Types in SharePoint Online using PowerShell PowerShell to Get Content Type by Content Type ID: SharePoint Online: PowerShell to Get Content Type by Name Here is the how to get content type by name in SharePoint Online using PowerShell SharePoint Online: PowerShell to List Content Types Let’s get all…

Read more

SharePoint Online: Get Columns from Content Type using PowerShell

Requirement: PowerShell to Get Content Type Fields in SharePoint Online. PowerShell to Get Columns from Content Type in SharePoint Online: SharePoint Online : PowerShell to Get Content Type Fields from a List Here is my PowerShell to get a list Content Type and its columns, loop through them, and output a CSV…

Read more

SharePoint Online: Fix “An error occurred while enumerating through a collection: The collection has not been initialized. It has not been requested or the request has not been executed. It may need to be explicitly requested” in PowerShell

Problem: Error in SharePoint Online CSOM PowerShell script:“An error occurred while enumerating through a collection: The collection has not been initialized. It has not been requested or the request has not been executed. It may need to be explicitly requested” Root cause: Every collection must be explicitly loaded prior to accessing its…

Read more

SharePoint Online: Change Column Order in Content Type using PowerShell

Requirement: Change Column Order in SharePoint Online Content Type using PowerShell How to Change Column Order in SharePoint Online Content Type? The column order in SharePoint Online content types defines the order of fields displayed in list forms such as New, Edit, and View pages. To change the order in which the…

Read more

SharePoint Online: Change Content Type Order in New Menu using PowerShell

Requirement: Change content type order in SharePoint Online List using PowerShell How to Change Content Type Order in SharePoint Online List or Library? In a SharePoint Online list with multiple content types, you may want to change the order they appear in the “New” menu or even want to hide them from…

Read more

SharePoint Online: Set Default Content Type using PowerShell

Requirement: Set Default Content Type in SharePoint Online List using PowerShell How to change the default content type in SharePoint Online? A SharePoint list can have multiple content types. There are situations where you may want to set the default content type which appears in the new button. You can specify which…

Read more

SharePoint Online: Remove User from Subsite Permission using PowerShell

Requirement: Remove user from a SharePoint Online subsite How to remove a User from SharePoint Online Subsite? To remove a user from SharePoint Online subsite, Remove user from all groups of the site Remove user from direct permissions of the site (if any) But the problem is: We’ve to check each group…

Read more