Skip to content
Merged
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,73 @@ Creates a new custom theme, or overwrites an existing theme to modify its settin

## SYNTAX

### NewThemeSet
```
Add-SPOTheme [-Identity] <SpoThemePipeBind> -Palette <SpoThemePalettePipeBind> -IsInverted <Boolean>
[-Overwrite] [<CommonParameters>]
Add-SPOTheme
[-Identity] <SpoThemePipeBind>
-ColorPairs <SpoThemeColorPairPipeBind>
[-Overwrite]
[<CommonParameters>]
```

## DESCRIPTION
### LegacyThemeSet
```
Add-SPOTheme
[-Identity] <SpoThemePipeBind>
-Palette <SpoThemePalettePipeBind>
-IsInverted <Boolean>
[-Overwrite]
[<CommonParameters>]
```

The **Add-SPOTheme** cmdlet creates a new theme or updates an existing theme. The color palette settings can be passed as either a hash table or a dictionary.
## DESCRIPTION
The **Add-SPOTheme** cmdlet creates a new theme or updates an existing theme. The color pairs settings can be passed as a hash table. The color palette settings can be passed as either a hash table or a dictionary.
Copy link
Contributor

@samkabue samkabue Sep 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Add-SPOTheme cmdlet

This cmdlet #Closed

Copy link
Contributor

@samkabue samkabue Sep 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

. The

join with "while the" #Closed


Adding a theme does not apply the theme to any sites. It adds the theme to your tenant store, and then the theme is available in the list of themes under the **Change the look** option for modern pages.
Copy link
Contributor

@samkabue samkabue Sep 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tenant store

"tenant store" is an internal concept, shouldn't be in docs #Closed


## EXAMPLES
You can choose which parameter set to use depending on the legacy or new theme format you want to add. Please read [Site theme](https://learn.microsoft.com/sharepoint/site-theme) for more about new theme.
Copy link
Contributor

@samkabue samkabue Sep 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please read

See #Closed

Copy link
Contributor

@samkabue samkabue Sep 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://learn.microsoft.com/sharepoint/site-theme

use relative URL -- /sharepoint/site-theme #Closed

Copy link
Contributor

@samkabue samkabue Sep 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

have M365 Copilot polish this string -- and other strings.

See the SPO PR for more info on this #Closed


### Example 1
> [!NOTE]
> In multi-geo environments, themes added by an administrator in the primary geography are propagated and available across the entire organization. This` Add-SPOTheme` cmdlet is not supported for administrators in satellite geographies.
Copy link
Contributor

@samkabue samkabue Sep 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This Add-SPOTheme cmdlet

This cmdlet #Closed


## Examples

In this example, a new theme named `"Custom Cyan"` is created, with color palette settings that are various shades of cyan. Note that the settings are passed as a hash table.
### Example 1: Add a new format theme
Copy link
Contributor

@samkabue samkabue Sep 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

: Add a new format theme

remove stuff after ":" -- that should go to the example description #Closed

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update other examples too

In this example, a theme named `"Teal Theme"` is created, with color pair settings that are various shades of teal.

Copy link
Contributor

@samkabue samkabue Sep 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

description comes AFTER the example #Closed

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

update other examples too

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

```powershell
$colorPairs = @{
light = @(
@{ "accentColor": "#03787C"; "backgroundColor": "#ffffff" }
@{ "accentColor": "#ffffff"; "backgroundColor": "#03787C" }
@{ "accentColor": "#E3FFFD"; "backgroundColor": "#03787C" }
@{ "accentColor": "#03787C"; "backgroundColor": "#E3FFFD" }
@{ "accentColor": "#FFF9E3"; "backgroundColor": "#03787C" }
@{ "accentColor": "#03787C"; "backgroundColor": "#FFF9E3" }
@{ "accentColor": "#03787C"; "backgroundColor": "#F5F5F5" }
@{ "accentColor": "#242424"; "backgroundColor": "#F5F5F5" }
@{ "accentColor": "#155473"; "backgroundColor": "#ffffff" }
@{ "accentColor": "#ffffff"; "backgroundColor": "#155473" }
@{ "accentColor": "#155473"; "backgroundColor": "#E3FFFD" }
@{ "accentColor": "#E3FFFD"; "backgroundColor": "#155473" }
@{ "accentColor": "#FFF9E3"; "backgroundColor": "#155473" }
@{ "accentColor": "#155473"; "backgroundColor": "#FFF9E3" }
)
}

Add-SPOTheme -Identity "Teal Theme" -ColorPairs $colorPairs
```

### Example 2: Overwrite a new format theme

If you want to update an existing new format theme (to modify some of its color settings, for example), use the same syntax as shown previously, but add the `-Overwrite` flag to the **Add-SPOTheme** cmdlet.

```powershell
Add-SPOTheme -Identity "Teal Theme" -ColorPairs $colorPairs -Overwrite
```

### Example 3: Add a legacy format theme
In this example, a theme named `"Custom Cyan"` is created, with color palette settings that are various shades of cyan. Note that the settings are passed as a hash table.

```powershell
$themepalette = @{
Expand Down Expand Up @@ -70,9 +121,9 @@ Add-SPOTheme -Identity "Custom Cyan" -Palette $themepalette -IsInverted $false
> [!NOTE]
> Prior to the December 2017 release of the SPO Management Shell, the **Add-SPOTheme** cmdlet required that color palette settings be passed as a dictionary. We recommend that you use the latest version of the SPO Management Shell, or use the `HashToDictionary` function to convert a hash table to a dictionary if needed.

### Example 2
### Example 4: Overwrite a legacy format theme

If you want to update an existing theme (to modify some of its color settings, for example), use the same syntax as shown previously, but add the `-Overwrite` flag to the **Add-SPOTheme** cmdlet.
If you want to update an existing legacy format theme (to modify some of its color settings, for example), use the same syntax as shown previously, but add the `-Overwrite` flag to the **Add-SPOTheme** cmdlet.

```powershell
Add-SPOTheme -Identity "Custom Cyan" -Palette $themepalette -IsInverted $false -Overwrite
Expand All @@ -98,34 +149,34 @@ Accept pipeline input: True (ByValue)
Accept wildcard characters: False
```

### -IsInverted
### -Overwrite

> Applicable: SharePoint Online

Specifies whether the theme is inverted, with a dark background and a light foreground.
Overwrites a theme of the same name in case it exists.

```yaml
Type: System.Boolean
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases: None

Required: True
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -Overwrite
### -ColorPairs

> Applicable: SharePoint Online

Overwrites a theme of the same name in case it exists.
Specifies the color pairs of the theme, as a dictionary or hash table of theme slot values. Supports up to 16 color pairs.

```yaml
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases: None
Type: Microsoft.Online.SharePoint.PowerShell.SpoThemeColorPairPipeBind
Parameter Sets: NewThemeSet
Aliases:

Required: False
Position: Named
Expand All @@ -138,14 +189,14 @@ Accept wildcard characters: False

> Applicable: SharePoint Online

Specifies the palette of colors in the theme, as a dictionary of theme slot values.
Specifies the palette of colors in the theme, as a dictionary or hash table of theme slot values.

```yaml
Type: Microsoft.Online.SharePoint.PowerShell.SpoThemePalettePipeBind
Parameter Sets: (All)
Parameter Sets: LegacyThemeSet
Aliases:

Required: True
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Expand All @@ -155,6 +206,24 @@ Accept wildcard characters: False
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).

### -IsInverted

> Applicable: SharePoint Online

Specifies whether the theme is inverted, with a dark background and a light foreground.

```yaml
Type: System.Boolean
Parameter Sets: LegacyThemeSet
Aliases: None

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

## INPUTS

### Microsoft.Online.SharePoint.PowerShell.SpoThemePipeBind
Expand Down