Skip to content

Commit cd32fb5

Browse files
committed
add for multi-geo tenants
1 parent b3a4241 commit cd32fb5

File tree

1 file changed

+25
-17
lines changed
  • sharepoint/sharepoint-ps/Microsoft.Online.SharePoint.PowerShell

1 file changed

+25
-17
lines changed

sharepoint/sharepoint-ps/Microsoft.Online.SharePoint.PowerShell/Add-SPOTheme.md

Lines changed: 25 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -38,39 +38,47 @@ Add-SPOTheme
3838
```
3939

4040
## DESCRIPTION
41-
The **Add-SPOTheme** cmdlet creates a new theme or updates an existing theme. The color palette and color pairs settings can be passed as either a hash table or a dictionary.
41+
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.
4242

4343
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.
4444

4545
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.
4646

47+
> [!NOTE]
48+
> 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.
4749
4850
## Examples
4951

5052
### Example 1: Add a new format theme
53+
In this example, a theme named `"Teal Theme"` is created, with color pair settings that are various shades of teal.
54+
5155
```powershell
5256
$colorPairs = @{
5357
light = @(
54-
@{ "themePrimary": "#ffffff", "backgroundColor": "#03787C"; },
55-
@{ "themePrimary": "#E3FFFD", "backgroundColor": "#03787C"; },
56-
@{ "themePrimary": "#03787C", "backgroundColor": "#E3FFFD"; },
57-
@{ "themePrimary": "#FFF9E3", "backgroundColor": "#03787C"; },
58-
@{ "themePrimary": "#03787C", "backgroundColor": "#FFF9E3"; },
59-
@{ "themePrimary": "#03787C", "backgroundColor": "#F5F5F5"; },
60-
@{ "themePrimary": "#242424", "backgroundColor": "#F5F5F5"; },
61-
@{ "themePrimary": "#155473", "backgroundColor": "#ffffff"; },
62-
@{ "themePrimary": "#ffffff", "backgroundColor": "#155473"; },
63-
@{ "themePrimary": "#155473", "backgroundColor": "#E3FFFD"; },
64-
@{ "themePrimary": "#E3FFFD", "backgroundColor": "#155473"; },
65-
@{ "themePrimary": "#FFF9E3", "backgroundColor": "#155473"; },
66-
@{ "themePrimary": "#155473", "backgroundColor": "#FFF9E3"; }
58+
@{ "accentColor": "#03787C"; "backgroundColor": "#ffffff" }
59+
@{ "accentColor": "#ffffff"; "backgroundColor": "#03787C" }
60+
@{ "accentColor": "#E3FFFD"; "backgroundColor": "#03787C" }
61+
@{ "accentColor": "#03787C"; "backgroundColor": "#E3FFFD" }
62+
@{ "accentColor": "#FFF9E3"; "backgroundColor": "#03787C" }
63+
@{ "accentColor": "#03787C"; "backgroundColor": "#FFF9E3" }
64+
@{ "accentColor": "#03787C"; "backgroundColor": "#F5F5F5" }
65+
@{ "accentColor": "#242424"; "backgroundColor": "#F5F5F5" }
66+
@{ "accentColor": "#155473"; "backgroundColor": "#ffffff" }
67+
@{ "accentColor": "#ffffff"; "backgroundColor": "#155473" }
68+
@{ "accentColor": "#155473"; "backgroundColor": "#E3FFFD" }
69+
@{ "accentColor": "#E3FFFD"; "backgroundColor": "#155473" }
70+
@{ "accentColor": "#FFF9E3"; "backgroundColor": "#155473" }
71+
@{ "accentColor": "#155473"; "backgroundColor": "#FFF9E3" }
6772
)
6873
}
6974
7075
Add-SPOTheme -Identity "Teal Theme" -ColorPairs $colorPairs
7176
```
7277

7378
### Example 2: Overwrite a new format theme
79+
80+
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.
81+
7482
```powershell
7583
Add-SPOTheme -Identity "Teal Theme" -ColorPairs $colorPairs -Overwrite
7684
```
@@ -170,7 +178,7 @@ Type: Microsoft.Online.SharePoint.PowerShell.SpoThemeColorPairPipeBind
170178
Parameter Sets: NewThemeSet
171179
Aliases:
172180

173-
Required: True
181+
Required: False
174182
Position: Named
175183
Default value: None
176184
Accept pipeline input: False
@@ -188,7 +196,7 @@ Type: Microsoft.Online.SharePoint.PowerShell.SpoThemePalettePipeBind
188196
Parameter Sets: LegacyThemeSet
189197
Aliases:
190198

191-
Required: True
199+
Required: False
192200
Position: Named
193201
Default value: None
194202
Accept pipeline input: False
@@ -209,7 +217,7 @@ Type: System.Boolean
209217
Parameter Sets: LegacyThemeSet
210218
Aliases: None
211219

212-
Required: True
220+
Required: False
213221
Position: Named
214222
Default value: None
215223
Accept pipeline input: False

0 commit comments

Comments
 (0)