kwizcom banner advertisement

SharePoint Online: How to Hide Default Themes?

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

PowerShell to Hide Default Themes in SharePoint Online:
Open SharePoint Online Management Shell, and run this PowerShell script to hide default themes in SharePoint Online.
#SharePoint Online Admin Center URL
$AdminURL = "https://crescent-admin.sharepoint.com/"

#Get Credentials to connect
$Cred = Get-Credential

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

#Check If Default Themes are hidden already
If(Get-SPOHideDefaultThemes) 
{
    Write-Host -f Yellow "Default themes are already hidden!"
}
Else
{
    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 Site Settings menu in modern SharePoint Online sites:

To reverse (Enable all default themes), simply call the "Set-SPOHideDefaultThemes" cmdlet with "$False" parameter.
Set-SPOHideDefaultThemes $False
SharePoint Online: How to Hide Default Themes? SharePoint Online: How to Hide Default Themes? Reviewed by Salaudeen Rajack on December 17, 2017 Rating: 5

No comments:

Please Login and comment to get your questions answered!

Powered by Blogger.