Customize the theme of Windows 8 with Powershell

The full article and the script can be found here at Technet.

Step 1: Start with opening a Powershell and type the following command Import-Module <path to script>, and press enter.
Click to enlarge

Step 2: To see a list of all commands and to get help on syntax, parameters and to see some examples, type Get-Help Change-Theme -Full
Click to enlarge

Change-Theme -Color
Running this command will allow you to set the color of Windows 8 that should be used. This is done by entering a number between 0 and 24 according to the image below. (Default color is 8)
Click to enlarge

Change-Theme -MenuBackground
To change the accent overlay, run this command and specify a value between 100 and  119 according to the image below.
Click to enlarge

Change-Theme -Background
To change the wallpaper of the client, use this command and specify the full path to the image file that will be used. (For example C:Imagesbackground.jpg)

Change-Theme -SaveConfiguration
This command will allow you to save the information to a csv-file, default C:ThemeConfigurationConfig.csv, for you to use as a backup or to use on other clients with the -LoadConfiguration command.

Change-Theme -LoadConfiguration
Running this command will allow you to load values from a Config.csv file created earlier. Enter the path to the folder where the Config.csv file is located and press Enter. (For example C:ThemeConfiguration)

Config.csv

If you prefer, you can edit this file directly with the values and later use the -LoadConfiguration command.
Click to enlarge

Sample code (Download to get the full code)

$ColorNumberValue = Get-ChildItem -Path 'HKCU:SoftwareMicrosoftWindowsCurrentVersionExplorer' | ForEach-Object {Get-ItemProperty $_.pspath} | Where-Object {$_.ColorSet_Version3} | ForEach-Object {$_.ColorSet_Version3} 
$MenuBackgroundValue = Get-ChildItem -Path 'HKCU:SoftwareMicrosoftWindowsCurrentVersionExplorer' | ForEach-Object {Get-ItemProperty $_.pspath} | Where-Object {$_.'AccentId_v8.00'} | ForEach-Object {$_.'AccentId_v8.00'} 
[string]$WallpaperValue = Get-ChildItem -Path 'HKCU:Control Panel' | ForEach-Object {Get-ItemProperty $_.pspath} | Where-Object {$_.Wallpaper} | ForEach-Object {$_.Wallpaper} 

$ColorNumberLoad = $($line.ColorNumber) 
$MenuBackgroundLoad = $($line.MenuBackground) 
$WallpaperLoad = $($line.Wallpaper)
This entry was posted in Powershell, Windows 8 and tagged , , , , , , . Bookmark the permalink.

Leave a Reply

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