Restoring a Site Collection with PowerShell in SharePoint 2013


In this article I will describe that how to restore site from recycle bin.

This will use below terms:-
1. PowerShell: PowerShell is a new command shell and scripting language for Windows. This is enriched by SharePoint libraries.
2. SPDeletedSite: The deleted site collections are stored in the SPDeletedSite object.

Restoring SiteCollection:

Once a site collection has been deleted, it goes directly to sharepoint Recycle bin.
Now, if the site collection was deleted through PowerShell or some other code, it cannot be restored using below explained PowerShell command, but if it was deleted through the browser, then it can be restored from recycle bin using below PowerShell command.

Get-SPDeletedSite | Where-Object –Property URL 
–eq –VALUE “ | Restore-SPDeletedSite

Quick Note: In SharePoint 2013; recycle bin, default is set to 30days. So after 30days you cannot get back data from recycle bin. You may change this setting if required.



calendarJanuary 1, 2014 · cardInfoyen · commentsNo Comments
tagPosted in: PowerShell, SharePoint

Leave a Reply

Spam Protection: , required

myworldmaps infoyen