You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/declarative-customization/site-theming/sharepoint-site-theming-powershell.md
+36-17Lines changed: 36 additions & 17 deletions
Original file line number
Diff line number
Diff line change
@@ -29,22 +29,12 @@ The following cmdlets are available for managing site themes from PowerShell:
29
29
30
30
## Add-SPOTheme
31
31
32
-
The **Add-SPOTheme** cmdlet creates a new theme or updates an existing theme. The color pallette settings are passed as a dictionary.
32
+
The **Add-SPOTheme** cmdlet creates a new theme or updates an existing theme. The color pallette settings can be passed as either a hash table or a dictionary.
33
33
34
-
In the following example, a new theme named "Custom Cyan" is created, with color pallette settings that are various shades of cyan. Note that this example uses a ```HashToDictionary``` function to convert a hash table created with the ```@{}``` notation into a dictionary, as required by **Add-SPOTheme**.
34
+
In the following example, a new theme named "Custom Cyan" is created, with color pallette settings that are various shades of cyan. Note that the settings are passed as a hash table.
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.
79
86
80
87
```powershell
@@ -84,7 +91,9 @@ Adding a theme does not apply the theme to any sites. It adds the theme to your
84
91
85
92
## Get-SPOTheme
86
93
87
-
The **Get-SPOTheme** cmdlet returns the settings for an existing theme. For example, here's how to use the **Get-SPOTheme** cmdlet to return the settings for the "Custom Cyan" theme created in the previous example.
94
+
The **Get-SPOTheme** cmdlet returns the settings for a named existing theme, or for all uploaded themes if no name is provided.
95
+
96
+
Here's how to use the **Get-SPOTheme** cmdlet to return the settings for the "Custom Cyan" theme created in the previous example.
The **Remove-SPOTheme** cmdlet removes a theme from your tenant store. For example, this cmdlet removes the "Custom Cyan" theme that was used in the previous examples.
> this cmdlet was named as ```Set-HideDefaultThemes``` until December 2017 release of SPO Management Shell. We recommend that you'd use the latest version of the PowerShell cmdlets.
156
+
> This cmdlet was named ```Set-HideDefaultThemes``` until the December 2017 release of SPO Management Shell. We recommend that you use the latest version of the PowerShell cmdlets.
138
157
139
158
The **Set-SPOHideDefaultThemes** cmdlet is used to specify whether the default themes that come with SharePoint should be included in the theme picker list. For example, you might want to create custom themes for your sites and then remove the default themes, to ensure that all pages will use your custom themes.
> this cmdlet was named as ```Get-HideDefaultThemes``` until December 2017 release of SPO Management Shell. We recommend that you'd use the latest version of the PowerShell cmdlets.
175
+
> this cmdlet was named ```Get-HideDefaultThemes``` until the December 2017 release of SPO Management Shell. We recommend that you use the latest version of the PowerShell cmdlets.
157
176
158
177
The **Get-SPOHideDefaultThemes** cmdlet retrieves the currrent **Set-SPOHideDefaultThemes** setting. You might want to use this cmdlet in a PowerShell script to read the setting and then take different actions based on whether the default themes are hidden. This cmdlet does not have any parameters.
0 commit comments