09-26-2019 04:44 AM - edited 09-26-2019 04:45 AM
On September 23rd (3 days ago) a user deleted a large number of files from SharePoint online.
Files are still in 1st Recycle Bin.
My question is:
What would be the most simple command to restore those files?
I'm little confused because I'm not sure from which side to "attack" the issue.
Kind regards,
Dino
09-26-2019 06:36 AM - edited 09-26-2019 06:37 AM
You can use Pnp cmdlet to restore the file with filters of the deleted user name and date filter. Please refer the below script.
Get-PnPRecycleBinItem -firststage | Where-object {($_.DeletedDate -gt $Deletedate) -and ($_.DeletedByEmail -eq 'test@domain.com')} | Restore-PnpRecycleBinItem -Force
08-13-2020 03:07 PM
08-13-2020 05:25 PM