February 2013
Intermediate to advanced
304 pages
8h 26m
English
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 ...
Read now
Unlock full access