Restoring a Site Collection with PowerShell in SharePoint 2013
Introduction:
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.
1 2 | Get-SPDeletedSite | Where-Object –Property URL –eq –VALUE “http://infoyen.com/sharepointblogs/”) | 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.
References-
http://technet.microsoft.com/en-us/library/hh286319.aspx
Thanks!
Avinash
January 1, 2014
В·
Infoyen В·
No Comments
Posted in: PowerShell, SharePoint
Leave a Reply