Theme
7 TopicsSharePoint - PowerShell script to force Modern Theme for all existing subsites in a Site Collection
In SharePoint sites, we can a lot of subsites and assign the Modern Theme for each could be long. To simplify that action, I created the following PowerShell script to simplify this update. You will need an access as O365 SPO tenant admin to execute the command "Set-PnPWebTheme" as explained into the official documentation: Set-PnPWebTheme #Register-PSRepository -Default #> Required to force PowerShell module reconfig when install-module command is failing #Install-Module -Name PnP.PowerShell -Force #> Required to install PNP.PowerShell module on your computer [string]$TeamSiteToUpdate = "https://YourTenant.sharepoint.com/sites/YourTeamsite/" [string]$TenantRootURL = "https://YourTenant.sharepoint.com" [string]$SubsiteFullURL = "" [string]$ThemeName = "Your Theme Name" Import-Module PnP.PowerShell -DisableNameChecking #Connect the root teamsite to get the list of SubSites Connect-PnPOnline -Url $TeamSiteToUpdate -UseWebLogin $web = Get-PnpWeb $AllSubWebs = Get-PnPSubWeb -Recurse Disconnect-PnPOnline #Connect the SharePoint Tenant to force the defined Theme into each of the subsites and root site Connect-PnPOnline -Url https://YourTenant-admin.sharepoint.com -UseWebLogin Set-PnPWebTheme -Theme $ThemeName –WebUrl $TeamSiteToUpdate foreach($MySubsite in $AllSubWebs) { $SubsiteFullURL = $TenantRootURL + $MySubsite.ServerRelativeUrl Write-Host "Subsite Name:", $MySubsite.Title, " - Full URL:", $SubsiteFullURL ,"(RelativeURL:", $MySubsite.ServerRelativeUrl, ")" Set-PnPWebTheme -Theme $ThemeName –WebUrl $SubsiteFullURL Write-Host " >>> Theme Applied - ", $ThemeName -ForegroundColor Green } Disconnect-PnPOnline When your script is adapted and executed, you will find the root site and subsites with the correct Theme. You can also use this script to adapt the case with different Theme for subsites versus rootsite Fabrice Romelard1.5KViews0likes0CommentsModern SharePoint site "Theme" suddenly changed from our Organization theme setup in Admin Portal
We use SharePoint Online and primarily have Modern sites created from O365 Groups. Late last week I noticed that our Modern sites (Group, Team & Communication sites) seem to have somehow reset and are no longer using the theme designated in the Admin Portal under Settings- Organization Profile. Our classic sites and SharePoint Home still show our Org theme. But, most of our sites are showing MS blue & white. I can't seem to change this. I've tried reapplying our theme but, no dice. Any ideas?Solved29KViews1like58CommentsDefault SPO page banner image too dark with custom theme
Since a few days the default SPO page banner image suddenly changed and now it is too dark. When using default (not dark) SPO themes it is like this: However, using the custom theme of my client, it is like this and the text is very hard to read: Strange thing is that it was working just fine a few days ago. I think it has to do something with one of the color slots in the theme, but I cannot figure out which one. Help would be much appreciated. This is the custom theme, and was generated using the UI Fabric Theme Designer with #FF0062 as primary color, #000000 as text color and #ffffff as background color: @{ "themePrimary" = "#ff0062"; "themeLighterAlt" = "#fff5f9"; "themeLighter" = "#ffd6e6"; "themeLight" = "#ffb3d0"; "themeTertiary" = "#ff66a1"; "themeSecondary" = "#ff1f75"; "themeDarkAlt" = "#e60058"; "themeDark" = "#c2004a"; "themeDarker" = "#8f0037"; "neutralLighterAlt" = "#f8f8f8"; "neutralLighter" = "#f4f4f4"; "neutralLight" = "#eaeaea"; "neutralQuaternaryAlt" = "#dadada"; "neutralQuaternary" = "#d0d0d0"; "neutralTertiaryAlt" = "#c8c8c8"; "neutralTertiary" = "#595959"; "neutralSecondary" = "#373737"; "neutralPrimaryAlt" = "#2f2f2f"; "neutralPrimary" = "#000000"; "neutralDark" = "#151515"; "black" = "#0b0b0b"; "white" = "#ffffff"; }969Views0likes0CommentsAllow transparent background color of the top navigation bar in Office 365
It is not possible to put the transparent background color in the office 365 bar when a background image is selected. When putting the background color in hexadecimal format, there is a server validation that does not allow to indicate the color format with transparency1.2KViews2likes0CommentsSharePoint Online - Configure the Theme for the modern look pages
The Theme and color management is now different for SharePoint Online, due to the implementation of the Office 365 Groups and all the connected services (Teams, Planner, Stream, ...). The solution to change the color set is now directly at the tenant level using the following PowerShell Script: [string]$themePaletteCustomName = "Your Customized Theme" $themepaletteCustom = @{ "themePrimary" = "#102542"; #Navy "themeLighterAlt" = "#d6e3f5"; "themeLighter" = "#fef1ef"; #Coral, themeLighter "themeLight" = "#fde2df"; #Coral, themeLight "themeTertiary" = "#6495da"; "themeSecondary" = "#3e7bd1"; "themeDarkAlt" = "#F87060"; #Coral "themeDark" = "#F87060"; #Coral "themeDarker" = "#193a68"; "neutralLighterAlt" = "#f8f8f8"; "neutralLighter" = "#f4f4f4"; "neutralLight" = "#eaeaea"; "neutralQuaternaryAlt" = "#dadada"; "neutralQuaternary" = "#d0d0d0"; "neutralTertiaryAlt" = "#c8c8c8"; "neutralTertiary" = "#e2e2e2"; "neutralSecondary" = "#53C7BD"; #Turquoise "neutralPrimaryAlt" = "#656565"; "neutralPrimary" = "#6f6f6f"; "neutralDark" = "#4f4f4f"; "black" = "#3e3e3e"; "white" = "#ffffff"; "primaryBackground" = "#ffffff"; "primaryText" = "#6f6f6f"; "bodyBackground" = "#ffffff"; "bodyText" = "#6f6f6f"; "disabledBackground" = "#f4f4f4"; "disabledText" = "#c8c8c8"; "accent" = "#F87060"; #Coral } [string]$username = "Admin@tenant.onmicrosoft.com" [string]$PwdTXTPath = "D:\SECUREDPWD\ExportedPWD-$($username).txt" $secureStringPwd = ConvertTo-SecureString -string (Get-Content $PwdTXTPath) $adminCreds = New-Object System.Management.Automation.PSCredential $username, $secureStringPwd Connect-SPOService -Url https://Tenant-admin.sharepoint.com -credential $adminCreds -ErrorAction SilentlyContinue -ErrorVariable Err # TO CHANGE THE USAGE OF THE DEFAULT COLORSET CHOICE Write-Host " =>Status for the Default Theme Availability in modern site" Get-SPOHideDefaultThemes Write-Host " => Hide the default Theme in the modern site" Set-SPOHideDefaultThemes $false #Or $True if you want to hide all Write-Host " =>Status for the Default Theme Availability in modern site" Get-SPOHideDefaultThemes # TO GET ALL THE PERSONAL COLORSET ADD AT THE TENANT LEVEL $AllThemes = Get-SPOTheme Write-Host " >> Customited Theme Installed:", $AllThemes.count Write-Host "--------------------------------------------------------------------------------------------" Add-SPOTheme -Name $themePaletteCustomName -Palette $themepaletteCustom -IsInverted $false -Overwrite #TO REMOVE THE CUSTOMIZED THEME YOU DON'T WANT ANYMORE #Remove-SPOTheme -Name $themePaletteCustomName $AllThemes = Get-SPOTheme The result is visible into the modern pages clicking on the wheel button and select "Change the look": To find more documentation, you can go to the official MS documentation pages or the following links: https://docs.microsoft.com/en-us/sharepoint/dev/declarative-customization/site-theming/sharepoint-site-theming-overview https://docs.microsoft.com/en-us/powershell/module/sharepoint-online/?view=sharepoint-ps https://github.com/SharePoint/sp-dev-docs/blob/master/docs/declarative-customization/site-theming/sharepoint-site-theming-json-schema.md http://itgroove.net/align/change-color-spo-modern-experience/ https://laurakokkarinen.com/how-to-create-a-multicolored-theme-for-a-modern-sharepoint-online-site/ http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2017/10/17/how-to-use-powershell-to-customize-the-theme-of-a-sharepoint-modern-site.aspx Fabrice Romelard6.7KViews0likes2CommentsUsing Add-SPOTheme removed all the themes from HubSite
I followed the link below to apply a new theme to the tenant, it's not showing themes under Settings > Change the look in Hub sites, but it' available on other sites which are not hub site or associated with the hub site. Getting: There are no themes available https://docs.microsoft.com/en-us/powershell/module/sharepoint-online/Add-SPOTheme?view=sharepoint-ps1.9KViews0likes2Comments