SharePoint Online: How to Hide Default Themes?

Themes are quick ways to add branding to SharePoint Online sites. However, we wanted to restrict site owners from changing the themes for a uniform look and feel overall sites. Fortunately, SharePoint Online provides a cmdlet to hide default themes and enforce governance.

SharePoint Online comes with a set of default themes such as Teal, Blue, Orange, Red, Purple, etc. While these default themes allow sites to look polished immediately, organizations often prefer implementing branded themes that align with corporate guidelines. Fortunately, SharePoint administrators have the ability to hide these default themes through PowerShell. This prevents users from accessing the pre-built themes in the theme gallery.

show hide default themes in sharepoint online

PowerShell to Hide Default Themes in SharePoint Online

Hiding the default themes in SharePoint Online is a relatively simple process through PowerShell. Open SharePoint Online Management Shell, and run this PowerShell script to hide default themes in SharePoint Online:

#SharePoint Online Admin Center URL
$AdminURL = ""

#Get Credentials to connect
$Cred = Get-Credential

#Connect to SharePoint Online
Connect-SPOService -url $AdminURL -credential $Cred

#Check If Default Themes are hidden already
    Write-Host -f Yellow "Default themes are already hidden!"
    Set-SPOHideDefaultThemes $True
    Write-Host -f Yellow "Default themes are now hidden!"

Now, this is what you get when you click on “Change the Look” from the Site Settings menu in modern SharePoint Online sites:

To reverse (Enable all default themes), call the “Set-SPOHideDefaultThemes” cmdlet with the “$False” parameter.

Set-SPOHideDefaultThemes $False

PnP PowerShell to Hide Default Themes in SharePoint Online

In SharePoint Online, the default themes can’t be deleted. However, these themes can be hidden from view! Let me show you how to hide default themes in SharePoint Online using PnP PowerShell.

#Config Variables
$AdminSiteURL = ""

#Connect to Admin Center
Connect-PnPOnline -Url $AdminSiteURL -Interactive

#Hide Default Themes
Set-PnPHideDefaultThemes -HideDefaultThemes $True

SharePoint Online provides default themes that you can use to customize the look and feel of your site. However, sometimes you may want to limit the available themes to prevent users from selecting inappropriate or conflicting themes. In this article, we’ve shown how to use PowerShell to hide the default themes in SharePoint Online. This will ensure employees only utilize company-approved branding on their SharePoint portals going forward.

Salaudeen Rajack

Salaudeen Rajack - Information Technology Expert with Two-decades of hands-on experience, specializing in SharePoint, PowerShell, Microsoft 365, and related products. He has held various positions including SharePoint Architect, Administrator, Developer and consultant, has helped many organizations to implement and optimize SharePoint solutions. Known for his deep technical expertise, He's passionate about sharing the knowledge and insights to help others, through the real-world articles!

Leave a Reply

Your email address will not be published. Required fields are marked *