Restore Deleted Site Collection

One of my colleagues came to me in a flustered state recently, having accidentally deleted one of our main site collections. Alas this was very easily done - when trying to delete a sub site they'd gone into site settings, but from force of habit then clicked into Site Collection Settings, before choosing to delete the site.

This initially gave me pause, because without a Site Collection there's no Recycle Bin to get it back from! Luckily it was straightforward to recover, though Powershell was needed. (Which would be a problem with some hosting companies!)

So I opened the SharePoint Powershell console on the server and typed;

Get-SPDeletedSite "/sites/*"

I used the wildcard because frankly I couldn't remember the exact spelling! ;)

The console returned and confirmed the Site Collection had been deleted and when, plus the correct name.

To recover I typed;

Get-SPDeletedSite "/sites/MySiteCollectionName" | Restore-SPDeletedSite 

Also entered Y to confirm going ahead in the dialogue. The restore took under a second.

 

 

Business happy and a colleague who owes me a drink. Nice afternoons work!

Happy SharePointing!!