SharePoint Online: Delete All Files and Sub-Folders from a Folder Recursively using PowerShell

Requirement: Empty a Folder in SharePoint Online document library by deleting all its files and Sub-Folders recursively. PowerShell to Delete All Files and Sub-Folders from a SharePoint Online Folder Let’s delete a folder with subfolder and files from SharePoint Online. This PowerShell script deletes all files, sub-folders of a folder and then…

Read more

Fix ‘You have to delete all the items in this folder before you can delete the folder” Error in SharePoint Online

Problem: When trying to delete a folder that has sub-folders and files, got an error message “You have to delete all the items in this folder before you can delete the folder” in SharePoint Online. Root Cause: Usually, we don’t need to empty the folder before we delete it. However, If the…

Read more

SharePoint Online: Filter List View to Show Files Only from a Sub-Folder using PowerShell

Requirement: Set a list view filter to show files from a specific folder in a SharePoint Online document library. How to Set the View Filter to Show Files from a Folder? Unfortunately, The SharePoint web user interface doesn’t provide us an option to set a view filter based on folder, sub-folders. While…

Read more

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: Here is the PowerShell to upload a folder structure from local drive to SharePoint Online document library. This script copies all folders and sub-folders from the given source to SharePoint Online document library. If you…

Read more

SharePoint Online: View Folder Size using PowerShell

Requirement: Get Folder Size in SharePoint Online. How to Check a Folder Size in SharePoint Online? To view folder size in SharePoint Online, go to: Site Settings >> Click on “Storage Metrics” link under “Site Collection Administration” On the storage metrics page, click on the document library to navigate to the location…

Read more

SharePoint Online: Delete All Files in a Document Library using PowerShell

Requirement: Delete all documents in library in SharePoint Online How to Delete All Documents in Library in SharePoint Online? At times, you may want to delete multiple documents all at once. You can delete multiple files, folders, and sub-folders from a SharePoint Online document library in a few clicks: Navigate to your…

Read more

Disable “New Folder” in SharePoint Online Lists and Libraries

Requirement: Disable Folder Creation in SharePoint Online List or Document Library. How to Prevent Folder Creation in SharePoint Online? Folders can be created on any SharePoint list or library where the “New Folder” option is turned ON. By default, folders are enabled in libraries, and in lists. Like folders in Windows Explorer,…

Read more

How to Copy a Folder in SharePoint Online using PowerShell?

Requirement: Copy Folder in SharePoint Online using PowerShell How to a Copy Folder in SharePoint Online? Copying a folder in SharePoint Online modern experience is quite simple. Navigate to your SharePoint Online Document Library >> Select the Folder to Copy From the Toolbar, click on the “Copy to” button Select the destination…

Read more

SharePoint Online: PowerShell to Get Folder Permissions

Requirement: Get Folder Permissions in SharePoint Online using PowerShell How to Get Folder Permissions in SharePoint Online? Folder level permission in SharePoint Online helps to obtain fine-grained permissions. To view folder level permission in SharePoint Online: Go to the library where the folder to check permissions. Select the Folder and from the…

Read more