Command
Remove-Site
Description
The command to delete a site.
Examples
Remove the site with the confirmation message
$siteToDelete = Connect-Site -Url "http://myfarm1/sites/SiteToDelete" Remove-Site -site $siteToDeleteConfirm Are you sure you want to perform this action? Performing the operation "Remove-Site" on target "http://myfarm1/sites/SiteToDelete". [Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"): y
Remove the site without the confirmation message
$siteToDelete = Connect-Site -Url "http://myfarm1/sites/SiteToDelete" Remove-Site -site $siteToDelete -Force
Syntax
Remove-Site-Site <Site> [-Force <SwitchParameter>]
Parameters
-Force <SwitchParameter>
Specifies to skip the operation confirmation step.
Required? | False |
Default value | None |
Accept pipeline input? | False |
Accept wildcard characters? | False |
Parameter set name | (All) |
Aliases | None |
-Site <Site>
Specifies the site to transform.
Required? | True |
Default value | None |
Accept pipeline input? | True (ByValue, ByPropertyName) |
Accept wildcard characters? | False |
Parameter set name | (All) |
Aliases | None |