New-PnPWeb

Creates a new subweb under the current web

Syntax

New-PnPWeb
   -Title <String>
             -Url <String>
             -Template <String>
             [-Description <String>]
             [-Locale <Int>]
             [-BreakInheritance [<SwitchParameter>]]
             [-InheritNavigation [<SwitchParameter>]]
             [-Web <WebPipeBind>]
             [-Connection <SPOnlineConnection>]

Examples

------------------EXAMPLE 1------------------

New-PnPWeb -Title "Project A Web" -Url projectA -Description "Information about Project A" -Locale 1033 -Template "STS#0"

Creates a new subweb under the current web with URL projectA

Required Parameters

-Template

The site definition template to use for the new web, e.g. STS#0. Use Get-PnPWebTemplates to fetch a list of available templates

Type:String
Position:Named
Accept pipeline input:False
Accept wildcard characters:False
-Title

The title of the new web

Type:String
Position:Named
Accept pipeline input:False
Accept wildcard characters:False
-Url

The URL of the new web

Type:String
Position:Named
Accept pipeline input:False
Accept wildcard characters:False

Optional Parameters

-BreakInheritance

By default the subweb will inherit its security from its parent, specify this switch to break this inheritance

Type:SwitchParameter
Position:Named
Accept pipeline input:False
Accept wildcard characters:False
-Connection

Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type:SPOnlineConnection
Position:Named
Accept pipeline input:False
Accept wildcard characters:False
-Description

The description of the new web

Type:String
Position:Named
Accept pipeline input:False
Accept wildcard characters:False
-InheritNavigation

Specifies whether the site inherits navigation.

Type:SwitchParameter
Position:Named
Accept pipeline input:False
Accept wildcard characters:False
-Locale

The language id of the new web. default = 1033 for English

Type:Int
Position:Named
Accept pipeline input:False
Accept wildcard characters:False
-Web

This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead. Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit this parameter to use the current web.

Type:WebPipeBind
Position:Named
Accept pipeline input:False
Accept wildcard characters:False

Outputs

Microsoft.SharePoint.Client.Web