Question

This seems to be a common occurence with our users and OneDrive. One user tried to free up space on their hard drive and deleted 35K documents from a synced document library in SharePoint Online.

The problem is when I try restoring the folders using PowerShell using this command

Get-PnPRecycleBinItem -firststage | ? {($_.DeletedDate -gt $restoreDate) -and ($_.DeletedByEmail -eq 'jane.doe@corp.ca')} | Restore-PnpRecycleBinItem -Force

Restore-PnpRecycleBinItem : A folder with this name "fileserver" already exists in "/sites/siteurl/foldername". To restore the folder, rename the existing folder and try again.

If am able to restore the child items, should I care about restoring the parent folder? Why is it saying it exists if it was deleted and is in the recycle bin?

Was it helpful?

Solution

Someone may create a folder with the same name which was deleted in the library. That's why you get the error.

If you want to put the child items in this folder with the same name, you don't have to restore the parent folder.

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top