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

Requirement: Empty a Folder in the SharePoint Online document library by deleting all its files and Sub-Folders recursively. How to delete a folder with subfolders and files from SharePoint Online? Deleting files and sub-folders in SharePoint Online can be done through the SharePoint user interface. To delete all files and sub-folders from…

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 with sub-folders and files, I got an error message “You have to delete all the items in this folder before you can delete the folder” in SharePoint Online or OneDrive. You may also see the “Request was cancelled by event received. If attempting to delete…

Read more