Restore a Deleted Site Collection in SharePoint 2010 SP1+ and SharePoint 2013

If you’ve deleted a site collection (anytime as of or after SP1 in SharePoint 2010 – note prior to 2010 SP1, you’re out of luck), and you want to recover the site collection, it’s actually quite simple.

Note that in Office 365 simply go into the admin interface for SharePoint, in the section where you manage your site collections.  Look for the recycle bin icon on the ribbon, in there you can you just restore your deleted site.

Let’s be daring and delete my local mysite. 

SNAGHTML25e6559b[4]

image

Oh my goodness!  Whatever have I done!? 

Well, now’s the time to employ the good old PowerShell.  Start by launching an Admin PowerShell window and running the following:

Get-SPDeletedSite

This will return a list of all the deleted site collections.

image

What we’re looking for is the SiteId, which we’ll use in the next step.

Restore-SPDeletedSite –Identity <siteId>

SNAGHTML25f8ccf6

You’ll be prompted for confirmation.  Simply say yes, or just accept the default.

Note: You wont receive any confirmation, but if you simply go to your site, it’ll be recovered.

image

w00t!