PowerShell Script to Restore Deleted SiteCollection - Get SP deleted sites/ Find Deleted sites using Powershell
GetDeletedSites() Method will find the all the SP deleted sites in a WebApplication.
clear
Add-PSSnapin "Microsoft.SharePoint.PowerShell"
$webapp=Get-SPWebApplication -Identity "http://SP2013Dev"
$webapp.GetDeletedSites()
OutPut:
Note :
- If a site has been removed using Remove-SPSite by SharePoint Admin guys, then SPDeleteSite can't find your site.
- The Remove-SPSite cmdlet completely deletes an existing site collection and all subsites. This operation cannot be undone.
- So if you try to restore same site using the powershell Get-SPDeletedSite command, will fail and can't restore the site.
No comments:
Post a Comment