Set-PnPWeb

Tip

We encourage you to make improvements to this documentation. Please navigate to https://github.com/pnp/powershell/blob/dev/documentation/Set-PnPWeb.md to change this file.

Sets properties on a web

Syntax

Set-PnPWeb
   [-SiteLogoUrl <String>]
   [-AlternateCssUrl <String>]
   [-Title <String>]
   [-Description <String>]
   [-MasterUrl <String>]
   [-CustomMasterUrl <String>]
   [-QuickLaunchEnabled]
   [-MembersCanShare]
   [-NoCrawl]
   [-HeaderLayout <HeaderLayoutType>]
   [-HeaderEmphasis <SPVariantThemeType>]
   [-NavAudienceTargetingEnabled]
   [-MegaMenuEnabled]
   [-DisablePowerAutomate]
   [-CommentsOnSitePagesDisabled]
   [-HideTitleInHeader]
   [-Connection <PnPConnection>]
   [<CommonParameters>]

Description

Allows setting various properties on a web

Examples

EXAMPLE 1

Set-PnPWeb -CommentsOnSitePagesDisabled:$true

Disables the page comments to be shown below each page in the current web by default

EXAMPLE 2

Set-PnPWeb -QuickLaunchEnabled:$false

Hides the quick launch from being shown in the current web

EXAMPLE 3

Set-PnPWeb -NoCrawl:$true

Prevents the current web from being returned in search results

Parameters

-AlternateCssUrl

Sets the AlternateCssUrl of the web. Only works for classic pages.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-CommentsOnSitePagesDisabled

Defines if comments on modern site pages should be enabled by default ($false) or they should be hidden ($true)

Type:SwitchParameter
Position:Named
Default value:None
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:PnPConnection
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-CustomMasterUrl

Sets the CustomMasterUrl of the web. Only works for classic pages.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Description

Sets the description of the web

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-DisablePowerAutomate

Defines if Power Automate should be available on lists and document libraries ($false) or if the option should be hidden ($true)

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-HeaderEmphasis
Type:SPVariantThemeType
Accepted values:None, Neutral, Soft, Strong
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-HeaderLayout
Type:HeaderLayoutType
Accepted values:None, Standard, Compact, Minimal, Extended
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-HideTitleInHeader

Toggle the title visiblity in the header.

Set -HideTitleInHeader:$false to show the header

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-MasterUrl

Sets the MasterUrl of the web. Only works for classic pages.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-MegaMenuEnabled

Defines if the navigation menu should be shown as the mega menu ($true) or the smaller sized menu ($false)

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-MembersCanShare

Indicates if members of this site can share the site and individual sites with others ($true) or only owners can do this ($false)

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-NavAudienceTargetingEnabled

Defines if the navigation menu on a modern site should be enabled for modern audience targeting ($true) or not ($false)

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-NoCrawl

Indicates if this site should not be returned in search results ($true) or if it should be ($false)

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-QuickLaunchEnabled

Defines if the quick launch menu on the left side of modern Team Sites should be shown ($true) or hidden ($false)

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-SiteLogoUrl

Sets the logo of the web to the current url. If you want to set the logo to a modern team site, use Set-PnPSite -LogoFilePath.

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

Sets the title of the web

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False