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

Set-PnPTheme

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

Sets the theme of the current web.

Syntax

Set-PnPTheme [-ColorPaletteUrl <String>]
             [-FontSchemeUrl <String>]
             [-BackgroundImageUrl <String>]
             [-ResetSubwebsToInherit [<SwitchParameter>]]
             [-UpdateRootWebOnly [<SwitchParameter>]]
             [-Web <WebPipeBind>]

Detailed Description

Sets the theme of the current web, if any of the attributes is not set, that value will be set to null

Parameters

ParameterTypeRequiredDescription
BackgroundImageUrlStringFalseSpecifies the Background Image Url based on the server relative url
ColorPaletteUrlStringFalseSpecifies the Color Palette Url based on the site relative url
FontSchemeUrlStringFalseSpecifies the Font Scheme Url based on the server relative url
ResetSubwebsToInheritSwitchParameterFalseResets subwebs to inherit the theme from the rootweb
UpdateRootWebOnlySwitchParameterFalseUpdates only the rootweb, even if subwebs are set to inherit the theme.
WebWebPipeBindFalseThe web to apply the command to. Omit this parameter to use the current web.

Examples

Example 1

PS:> Set-PnPTheme

Removes the current theme and resets it to the default.

Example 2

PS:> Set-PnPTheme -ColorPaletteUrl /_catalogs/theme/15/company.spcolor

Example 3

PS:> Set-PnPTheme -ColorPaletteUrl /_catalogs/theme/15/company.spcolor -BackgroundImageUrl '/sites/teamsite/style library/background.png'

Example 4

PS:> Set-PnPTheme -ColorPaletteUrl /_catalogs/theme/15/company.spcolor -BackgroundImageUrl '/sites/teamsite/style library/background.png' -ResetSubwebsToInherit

Sets the theme to the web, and updates all subwebs to inherit the theme from this web.

© 2017 Microsoft