Thursday, February 25, 2021

Restore a deleted site collection (SharePoint 2010 / 2013 / 2016 / 2019 On-Premises)

Did you know that you can now restore a deleted site collection? Microsoft has issued two PowerShell commands for this need. The only caveat is that they only work in an on-premises farm. I tested both commands recently, and I can tell you firsthand that they work!

Get-SPDeletedSite: Gets a list of deleted site collections.

https://docs.microsoft.com/en-us/powershell/module/sharepoint-server/get-spdeletedsite?view=sharepoint-ps

Restore-SPDeletedSite: Restores a deleted site collection.

https://docs.microsoft.com/en-us/powershell/module/sharepoint-server/restore-spdeletedsite?view=sharepoint-ps