Forum Discussion
Dean_Gross
Feb 16, 2018Silver Contributor
Finding files in SPO recycle bin
what is the trick for finding specific files in SPO recycle bin? we can only sort by title and date deleted, there is no filtering and when there are thousands of files, it is an endless scroll which...
JSlei
May 16, 2019Brass Contributor
Dean_Gross You can use PowerShell to export the recycle bin items to a csv file and use excel to filter on dates, users, etc.
All you need to do is install the SharePoint PNP Powershell module and run the following:
Connect-PnPOnline -Url https://<sitecollectionurl/
Get-PnPRecycleBinItem -firstStage | export-csv <filepath>
- csesti-JabilOct 12, 2020Copper Contributor
Can we run a similar command to export the items from the Second Stage recycle bin of a users' OneDrive recycle bin? Also do you know if we can run a Flow that checks for items in a users OneDrive Second Stage recycle bin?
- JSleiOct 12, 2020Brass Contributor
csesti-Jabil you can use the same command with the Second Stage switch
Get-PnPRecycleBinItem -SecondStage
- Dean_GrossMay 17, 2019Silver Contributor
JSleithanks for the suggestion, that will help the SPO admins, but it won't help the site owners who can't use POSH. Microsoft still needs to address this basic level of functionality in the UI.
- Eric LE CORREMay 17, 2019Brass Contributor
https://lazyadmin.nl/powershell/restore-recycle-bin-sharepoint-online-with-powershell/amp/
and you also also filter by directory name :
$_.DirNAme -match "sites/…."
- Dean_GrossMay 17, 2019Silver Contributor
Eric LE CORRE thanks for the additional suggestion, but this won't help the site owner who is trying to find a file that was deleted. Site owners are empowered to do almost everything, they should not have to open a support ticket with their Help Desk to do something this simple