Change the background color of the Windows 8 Start screen (PowerShell)

Introduction

This sample shows how to change the background color of a Windows 8 Start screen by using a PowerShell script.

Scenarios

IT administrators can use this script to adjust the background color of the Windows 8 Start screen for a group of computers to keep the user experience consistent.

Script

This script contains the following functions:

You can use this script in following ways:

Method 1:

  1. Download the script and copy it to your computer.
  2. Open the script file by using Notepad or any other script editor.
  3. Scroll down to the end of the script file, and then add the function name and parameter to call the function.
  4. Save the file and then run the script on the computer.

Method 2:

  1. Rename scriptname.ps1 to scriptname.psm1 (PowerShell Module file)
  2. Run the Import-Module cmdlet to import this module file to the current session. For example:
    Import-Module filepath\scriptname.psm1 

Notes:

1. The input integer value range for this script is between 0 and 24. Please refer to the following image to understand the meaning of each integer value.

2. There are 25 squares in the previous image. Each square represents a Windows 8 background color scheme. The values that are underneath each square represent its corresponding input integer value.
3. The current user must log off and log on again for these changes to take effect.

Here are some code snippets for your references. To get the complete script sample, please click the download button at the beginning of this page.

PowerShell
Edit|Remove
if($valueFound -eq $true) 
            { 
                # If registry value "ColorSet_Version3" exists,change the value to specific color. 
                Set-ItemProperty -Path $path -Name $valueName -Value $ColorIndex 
            } 
            else 
            { 
                # If registry value does not exist,create one. 
                New-ItemProperty -Path $path -Name $valueName -PropertyType DWord -Value $ColorIndex 
            }

Examples 

Example 01: Display help about the Set-OSCWin8StartScreenBackColor function. 

Command: Get-Help Set-OSCWin8StartScreenBackColor

Screenshot:

Example 02: Set the background color of the Windows 8 Start screen with parameter “ColorIndex”.

Command: Set-OSCWin8StartScreenBackColor –ColorIndex 8

Screenshot:

Example 03: Display help about Set-OSCWin8StartScreenBackColorDefault function.

Command: Get-Help Set-OSCWin8StartScreenBackColorDefault

Screenshot:
 

Example 04: Set background color of Windows 8 Start screen to default. The default color parameter is 8. For more information, please refer to the image at the beginning of this documentation.

Command: Set-OSCWin8StartScreenBackColorDefault

Screenshot:

Prerequisites

PowerShell 3.0 

Additional Resources

Technical Resource:
Windows PowerShell Advanced Function