Table of Contents
Set Application Border Colors on Windows Server
Sometimes you have the need to differentiate servers by color because they simply look too much alike, for example, when having production and acceptance servers with the same application. Now usually you could easily do so by setting the background, preferably through a GPO. However, if you use application virtualization or Citrix you also want to set the application borders to a different color.
PowerShell
Windows Server 2012
The settings below work after you've logged in again
If you need to set this for 1 user you could do so per PowerShell:
#DEVELOPMENT (REDISH): Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\DWM" -Name "ColorizationColor" -Value 3305062464 Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\DWM" -Name "ColorizationAfterglow" -Value 3305062464 #TEST (YELLOWISH): Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\DWM" -Name "ColorizationColor" -Value 3304112896 Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\DWM" -Name "ColorizationAfterglow" -Value 3304112896 #Acceptance (GREENISH): Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\DWM" -Name "ColorizationColor" -Value 3289038662 Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\DWM" -Name "ColorizationAfterglow" -Value 3289038662
Windows Server 2016
The settings below work directly after setting them
If you need to set this for 1 user you could do so per PowerShell:
#DEVELOPMENT (REDISH): Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\DWM" -Name "AccentColor" -Value 4280488424 Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\DWM" -Name "ColorizationColor" -Value 3303543075 Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\DWM" -Name "ColorizationAfterglow" -Value 3303543075 Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\DWM" -Name "ColorPrevalence" -Value 1 #TEST (YELLOWISH): Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\DWM" -Name "AccentColor" -Value 4278237695 Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\DWM" -Name "ColorizationColor" -Value 3305093376 Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\DWM" -Name "ColorizationAfterglow" -Value 3305093376 Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\DWM" -Name "ColorPrevalence" -Value 1 #Acceptance (GREENISH): Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\DWM" -Name "AccentColor" -Value 4285189120 Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\DWM" -Name "ColorizationColor" -Value 3288386666 Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\DWM" -Name "ColorizationAfterglow" -Value 3288386666 Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\DWM" -Name "ColorPrevalence" -Value 1
Note that the colors are different from Windows Server 2012. Each OS has it's own color palette.
GPO
If you need to set this for multiple users these settings can better be put into a GPO. In the GPO you want to use, navigate to:
- User Configuration → Preferences → Windows Settings → Registry
- Right click the Registry item and click on New and select either Registry Item to configure each key separately or use the registry wizard to connect to a remote machine and import the settings from an existing machine.
TroubleShooting
Windows Server 2012
On Windows Server 2012 I've had problems when trying to use custom colors. It's best to use the pre set colors:
COLOR1 - GREY - 3297742735 COLOR2 - LIGHTBLUE - 3297036031 COLOR3 - PINK - 3304224457 COLOR4 - YELLOW - 3304112896 COLOR5 - LIME - 3297954602 COLOR6 - TURQOISE - 3293367757 COLOR7 - ORANGE - 3305084957 COLOR8 - RED - 3305062464 COLOR9 - MAGENTA - 3305068459 COLOR10 - GREEN - 3289038662 COLOR11 - LILA - 3300946431 COLOR12 - BLUE - 3293884415 COLOR13 - PURPLE - 3297546495 COLOR14 - BEIGE - 3299909003
If you so wanna play with custom colors, you can use PowerShell to convert hex color codes to the decimal values as required in the registry:
# Hex color: 4c9f38 [convert]::ToInt32("4c9f38", 16) 5021496
GPO
Note that there are gpo setting that prevent you from setting the colors. First check which policies are active for your current server/user combination by running
gpresult /h gpresult.html
This will create a html file so you can easily check the applied policies. Once you identified the policies open Group Policy Management on a Domain Controller (or on a computer with the RSAT installed and where you are logged on with sufficient privileges) and check the identified policies for:
- User Configuration → Policies → Administrative Templates → Control Panel → Personalize
It's best to set all settings in this section to “Not Configured”.
Colorization not Working over RDP / Citrix
We found that sometimes the colorization does not always work over RDP and Citrix, when enabled through GPO. Apparently, the rest of the “HKCU:\Software\Microsoft\Windows\DWM” key is not being loaded, and you need to add all keys inside “HKCU:\Software\Microsoft\Windows\DWM” to the policy.
Windows Server 2016
If Windows Server 2016 is not activated you can't perform personalization through the Control Panel. Even though it works through the registry settings it's probably best to just Activate Windows properly.
Resources
- GPO and registry settings: http://woshub.com/how-to-create-modify-and-delete-registry-keys-using-gpo/