Remove a Deleted Site Collection


Scenario/Problem: You need to remove a deleted site collection from your SharePoint farm.


Solution: Use the Remove-SPDeletedSite cmdlet with a site collection variable.

The Remove-SPDeletedSite cmdlet enables you to remove a specific site collection from the current server. Use this in conjunction with the Get-SPDeletedSite cmdlet (explained in a previous section), as shown in Listing 8.21, or just use the site collection identity directly in line, as shown in Listing 8.22.

Listing 8.21. Removing a Site Collection Using a Variable


$deletedSiteCol = Get-SPDeletedSite -Identity "/ sites/ deletedsitecol "
Remove-SPDeletedSite $deletedSiteCol


Listing 8.22. Removing a Deleted Site Collection Directly


Remove-SPDeletedSite -Identity " /sites/deletedsitecol"


..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.21.103.209