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

SharePoint Online: Web Designer Galleries (Site Columns, Content Types, Web Parts, List Templates, etc) Missing in Site Settings

Problem: Web Designer Galleries section with below links missing in SharePoint Online Site Settings page: Site Columns Content Types Web Parts List Templates Master Pages Themes Solutions Composed Look Also, under the “Site Collection Administration” section: HTML Field Security, SharePoint Designer Settings links missing! Solution: Enable Custom Script! To enable custom script…

Read more

SharePoint Online: PowerShell to Get Site Columns

Requirement: Get Site Columns in SharePoint Online using PowerShell SharePoint Online: How to Get Site Columns? Site columns or metadata fields you create at any list or library stays within that list or library. Say, you create a choice column “Department” in a list with a number of choices. If you need…

Read more