SharePoint Online: PowerShell to Bulk Create Folders in a Document Library from a CSV File

Requirement: Create Multiple Folders in a Document Library from a CSV File in SharePoint Online. PowerShell to Bulk Create Folders from a CSV File in SharePoint Online: I got to create a bunch of folders in a SharePoint Online document library! This PowerShell script takes folder names from a CSV file and…

Read more

SharePoint Online: Migrate a Folder with Sub-Folders and Files to SharePoint Online using PowerShell

Requirement: Migrate a folder with its sub-folders and files to SharePoint Online using PowerShell. PowerShell to copy a Folder with Its Sub-Folders and Files to SharePoint Online: Here is the PnP PowerShell to copy all files and sub-folders from a given folder from a local drive (or network drive) to SharePoint Online….

Read more

SharePoint Online: Get Document Library Inventory (Folder-SubFolder-File Structure) using PowerShell

Requirement: Get the file-folder structure of a SharePoint document library and export to CSV. SharePoint Online: PowerShell to get the Document Library Inventory Let’s export all folders, sub-folders, and files structure from a SharePoint Online document library to a CSV file: Get File-Folder Structure in a Document Library using PnP PowerShell Similarly,…

Read more

SharePoint Online: Restore Deleted Items from Recycle Bin using PowerShell

Requirement: Restore Items from recycle bin in SharePoint Online using PowerShell How to Restore Items from Recycle bin in SharePoint Online? The recycle bin in SharePoint Online site is more or less similar to what you have on your local PC. It lets you view and restore the items that have been…

Read more

SharePoint Online: Remove Unique Permissions from All Folders in a Document Library using PowerShell

Requirement: Remove unique permissions from all folders-sub-folders in a SharePoint Online document library. How to Delete Unique Permissions of a Folder in SharePoint Online? To remove unique permissions from a SharePoint Online Folder, follow these steps: Navigate to your SharePoint Online document library where the target folder is located.  Right click on Folder,…

Read more

SharePoint Online: Grant Permission to Each Folder in a Document Library using PowerShell

Requirement: Grant permission to all sub-folders in a SharePoint Online document library SharePoint Online: Grant Permission to Folders using PowerShell Here is the PowerShell to add a user to each folder in SharePoint Online list or document library. This script recursively loops through each sub-folder in the given list or library and…

Read more

SharePoint Online: Get All Folders from List using PowerShell

Requirement: Get All Folders from a SharePoint Online list using PowerShell PowerShell to Get All Folders in a SharePoint Online List Here is the CAML based approach to get all folders and sub-folders recursively from a list. This PowerShell get the list of folders from a SharePoint Online library. SharePoint Online: Get…

Read more

SharePoint Online: Delete Empty Folders using PowerShell

Requirement: Delete Empty Folders in SharePoint Online Document Library using PowerShell How to Find Empty Folders in SharePoint Online? If a folder doesn’t have any file or sub-folder in it, it is considered empty. So, here is how we can find empty folders in SharePoint Online from the web user interface. Navigate…

Read more

SharePoint Online: Move All Files from One Folder to Another using PowerShell

Requirement: Move All Files Between Folders in SharePoint Online using PowerShell PowerShell to Move All Files from One Folder to Another in SharePoint Online: How to move files between folders in SharePoint Online? Well, here is the PowerShell to move all files from one folder to another folder: This script moves all…

Read more