Commands › SharePoint Online

Add-SPOTheme

SharePoint Online Microsoft.Online.SharePoint.PowerShell Add-*

Creates a new custom theme, or overwrites an existing theme to modify its settings.

Quick start script

# Add-SPOTheme — quick start (serv365.ai)
# 1. Connect (app-only shown; interactive: omit the certificate parameters)
Connect-SPOService -Url https://$org-admin.sharepoint.com

# 2. Run and inspect
Add-SPOTheme -Identity <SpoThemePipeBind> | Format-List

# 3. Export for evidence / drift tracking
Add-SPOTheme | Export-Clixml .\SPOTheme-$(Get-Date -Format yyyyMMdd).xml

Syntax — 2 parameter sets

NewThemeSet

Add-SPOTheme
    [-Identity] <SpoThemePipeBind>
    -ColorPairs <SpoThemeColorPairPipeBind>
    [-Overwrite]
    [<CommonParameters>]

LegacyThemeSet

Add-SPOTheme
    [-Identity] <SpoThemePipeBind>
    -Palette <SpoThemePalettePipeBind>
    -IsInverted <Boolean>
    [-Overwrite]
    [<CommonParameters>]

Parameters (5)

ParameterTypeRequiredWhat it controls
-Identity SpoThemePipeBind yes Specifies the name of the theme. This must uniquely identify the theme.
-Overwrite SwitchParameter Overwrites a theme of the same name in case it exists.
-ColorPairs SpoThemeColorPairPipeBind Specifies the theme's color pairs using a hash table of slot values. Supports up to 16 color pairs.
-Palette SpoThemePalettePipeBind Specifies the palette of colors in the theme, as a dictionary or hash table of theme slot values.
-IsInverted Boolean Specifies whether the theme is inverted, with a dark background and a light foreground.

Reference facts derived from Microsoft documentation, © Microsoft, licensed CC BY 4.0; restructured with original guidance by serv365.ai.