Someone has accidentally deleted my Site Collection!

It’s Christmas, the party season is in full swing and people with hangovers (or those still drunk) should not be touching SharePoint……

So when you receive the ‘please help me, I’ve slipped on a mince pie and accidentally deleted a site collection’, Powershell is your Secret Santa!

Get-SPDeletedSite

Take a note of the ‘Site ID’

Get-SPDeletedSite | where{$_.SiteId -eq “c2353156-4a07-4998-a95a-b962b2ceebf5”} | Restore-SPDeletedSite

If the ‘Get-SPDeletedSite’ cmdlet doesn’t work for you, it is probably because you are missing this feature which was made available in SP2010 SP1.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s