One day I received a call from a frantic
customer who accidentally deleted a very valuable site and needed it restored
ASAP. I was still new, so their panic started to make me panic - especially
when I heard that the deleted site had also been emptied from the Recycle Bin
and the process to restore a site from SQL takes more time than we had.
Luckily, one of my team members was watching over my shoulder and said, “Use PowerShell to find the site and then restore it - it shouldn't even take 10 minutes."
Brilliant! Here are the PowerShell commands to restore a deleted SharePoint site:
Luckily, one of my team members was watching over my shoulder and said, “Use PowerShell to find the site and then restore it - it shouldn't even take 10 minutes."
Brilliant! Here are the PowerShell commands to restore a deleted SharePoint site:
Get-SPDeletedSite | select Path , siteid
(This will generate a list of all deleted sites and their GUIDs as seen below)
Then, run the command:
Restore-SPDeletedSite -Identity (SITE ID)
(in this case,
Restore-SpDeletedSite –Identity 4bff0c0e-4d56-4fec-8174-a60a16daeaac)This final command will restore the site