SharePoint Online: Fix “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” Error in PowerShell

Error: 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: You must load the object before you are trying to retrieve its properties! Solution: Here is how the problem can be resolved #Load SharePoint…

Read more

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

Error: Exception calling “ExecuteQuery” with “0” argument(s): “The remote server returned an error: (403) Forbidden.” in PowerShell scripts for SharePoint Online. Troubleshooting Checklist for 403 forbidden in SharePoint Online PowerShell: Follow this checklist to resolve Executequery 403 forbidden error in SharePoint Online PowerShell You may have provided the credentials of another tenant,…

Read more

SharePoint Online: Bulk Import Users to Groups from a CSV File using PowerShell

Requirement: Bulk add users from a CSV file to SharePoint Online Groups. Here is the CSV file with users and groups data to bulk add users to groups: SharePoint Online: Bulk Add Users to Group using PowerShell SharePoint Online groups help to manage security effectively by combining user accounts and security groups….

Read more

SharePoint Online: How to Get Direct Link to a Document In Modern Libraries?

Requirement: Get the direct link to a document in SharePoint Online. SharePoint Online: Get Direct Link to Document Unlike SharePoint Online’s classic experience, modern document libraries don’t provide a direct link to documents. However, here are the tricks to get a direct link to the file: Method 1: Using Copy Link Navigate…

Read more

SharePoint Online: Get Document Library Size using PowerShell

Requirement: Get the Size of a SharePoint Online Document Library How to Check SharePoint Online Document Library Size? To get a Document library size, do the following:  Login to your SharePoint Online site >> Click on Settings >> Site Settings Click on “Storage Metrics” under “Site Collection Administration” The storage metrics page…

Read more

SharePoint Online: Get Subsite Size using PowerShell

Requirement: Get Subsite Size in SharePoint Online How to Get Subsite Size in SharePoint Online? To find out the storage quota occupied by a subsite in SharePoint Online, go to: Site Settings >> Click on “Storage Metrics” link under “Site Collection Administration” Please note the data shown in storage metrics is not…

Read more

SharePoint Online: How to Change Date Format to “DD/MM/YYYY”?

Requirement: Change Date format to “DD/MM/YYYY” in SharePoint Online. How to Set Date Format in SharePoint Online? By default, SharePoint Online sites display the dates in US format (MM/DD/YYYY). You may want to change the date format based on the country you live in. Let’s see how to set the date format…

Read more

SharePoint Online: Publish All Files in a Library using PowerShell

Requirement: Bulk Publish Multiple Files in SharePoint Online PowerShell to check-in, Approve and Publish All Files in a Library: When you turn ON minor versioning in the SharePoint Online document library, any edits will not appear to users with read-only (or view only) permissions until you publish them. Publishing each file individually…

Read more

SharePoint Online: How to Publish a File using PowerShell?

Requirement: Publish a Document in SharePoint Online How to Publish a File in SharePoint Online? When you enabled minor versions (or drafts) in SharePoint Online, all changes to any document isn’t available to users with read-only permissions, until it’s published. Published documents become major versions such as 1.0. Here is how to…

Read more

Download All Files in a SharePoint Document Library using PowerShell

Requirement: Download all files in document library in SharePoint Download All Documents in a Library using PowerShell: Here is the PowerShell to download all files in a document library.  Download All Document Libraries from a SharePoint Site: How about downloading all files from all document libraries from a SharePoint site?

Read more