Step1. Run the below script to find out about the file in site collection recycle bin.
(Get-SPSite "http://SERVERNAME:PORT/").RecycleBin | ?{$_.Title -match "DeletedFile"}
If a matching file is found, Powershell will display information about the file. You will also be able to find who deleted it.
Step 2. Now take the ID of the item and restore back to the original location.
(Get-SPSite "http://SERVERNAME:PORT").RecycleBin.Restore("e7652991-b3b7-4df2-a3c8-39b76a8e98d3")
Dont forget to run PowerShell as administrator.
(Get-SPSite "http://SERVERNAME:PORT/").RecycleBin | ?{$_.Title -match "DeletedFile"}
If a matching file is found, Powershell will display information about the file. You will also be able to find who deleted it.
Step 2. Now take the ID of the item and restore back to the original location.
(Get-SPSite "http://SERVERNAME:PORT").RecycleBin.Restore("e7652991-b3b7-4df2-a3c8-39b76a8e98d3")
Dont forget to run PowerShell as administrator.
No comments:
Post a Comment