Pages

Thursday, June 18, 2015

How to Remove a SharePoint subsite through PowerShell

The Remove-SPWeb cmdlet completely deletes the Web specified by the Identity parameter.
Note: Deleting the top level Web site of a site collection causes the entire site collection to be removed.

Syntax

Remove-SPWeb [-Identity] <SPWebPipeBind> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm [<SwitchParameter>]] [-Recycle <SwitchParameter>] [-WhatIf [<SwitchParameter>]]

Example

Remove-SPWeb http://sitename/subsite

This example completely deletes a subsite.

No comments:

Post a Comment