Table of contents
TOC
Collapse the table of content
Expand the table of content

Remove-PnPWeb

Bert Jansen|Last Updated: 2/20/2017
|
1 Contributor

Removes a subweb in the current web

Syntax

Remove-PnPWeb -Url <String>
              [-Force [<SwitchParameter>]]
              [-Web <WebPipeBind>]
Remove-PnPWeb -Identity <WebPipeBind>
              [-Force [<SwitchParameter>]]
              [-Web <WebPipeBind>]

Parameters

ParameterTypeRequiredDescription
IdentityWebPipeBindTrueIdentity/Id/Web object to delete
UrlStringTrueThe site relative url of the web, e.g. 'Subweb1'
ForceSwitchParameterFalseDo not ask for confirmation to delete the subweb
WebWebPipeBindFalseThe web to apply the command to. Omit this parameter to use the current web.

Examples

Example 1

PS:> Remove-PnPWeb -Url projectA

Remove a web

Example 2

PS:> Remove-PnPWeb -Identity 5fecaf67-6b9e-4691-a0ff-518fc9839aa0

Remove a web specified by its ID

Example 3

PS:> Get-PnPSubWebs | Remove-PnPWeb -Force

Remove all subwebs and do not ask for confirmation

© 2017 Microsoft