Helping out with (small) company IT. Everyone using Office365, Sharepoint, OneDrive. The level of tech savvy is not high among users. People often deleting files, which I then need to find/restore. But going to Sharepoint online and trying to find things in the recycle bin is misery. Ie, today, I needed to find a copy of an .xls document that I knew the name of, but not the delete date for. Sharepoint Recycle bin just asks me to scroll through everything deleted, from today on back into history.
There must be a better way. Help?
22 Answers
You can use Get-PnpRecycleBinItems and Restore-PnpRecycleBinItems which are part of PnP PowerShell.
Install-Module -Name PnP.PowerShellOnce it's installed, you can connect to your site collection with this:
Connect-PnPOnline -Url -Interactive(Note, that authentication can be tricky. See the github docs for full details.)
From there, you can enumerate the list of things in the recycle bin:
$items = Get-PnpRecycleBinItems
# select the item(s) you want to restore; you could also use
# Where-Object to filter if you wanted
$itemsToRestore = $items | Out-GridView -OutputMode Multiple
$itemsToRestore | Restore-PnpRecycleBinItems You can try to use this tool , the feature for filter and restore items from SPO recycle bin, a lot of users complain about they can't filter and restore items from recycle bin, so we developed this feature which allow user to perform below actions,
Filter the items from recycle bin by delete date, delete by, path,screen shot
After filtering items, user can restore all filtered items by clicking the restore button,
After filtering items can export filtered items by clicking export button,