How to change the system display language in Windows (PowerShell)

 Introduction

This script sample can change the system display language in Windows. 

Scenarios

Here is a scenario that in a company the default language of Windows is Japanese. But some system admins only knows Japanese but not English. And the other admins only knows English. The English admins usually go to regional setting in the control panel and change the display language to English. After they finish their tasks they need to set back the language to Japanese. And these steps are really time consuming. This script can help users to change the system display language automatically.

Step 1: Start the PowerShell Console with administrator. To run the script in the Windows PowerShell Console, type the command< Script Path> at the Windows PowerShell Console.

Step 2:  If you want to know how to use this script, you can type the command Get-Help C:\Script\ChangeSystemDisplayLanguage.ps1 -Full to display the entire help file for this function, such as the syntax, parameters, or examples.

Example

Example 1: Type C:\Script\ChangeSystemDisplayLanguage.ps1 -availableLanguage in the Windows PowerShell Console. 

This command line shows how to list all the installed system languages in Windows.

Example 2: Type C:\Script\ChangeSystemDisplayLanguage.ps1 –LanguageTag "zh-CN" in the Windows PowerShell Console.

This command shows how to change the current system display language to Chinese in Windows.

Here are some code snippets for your reference.

PowerShell
Edit|Remove
If($GetInternationalModule) 
{ 
    If($AvailableLanguage) 
    { 
        #Check for installed language packs 
        $UserLanguageList = Get-WinUserLanguageList 
        $UserLanguageList | Select LanguageTag,@{Expression={$_.EnglishName};Name="LanguageName"} 
    } 
  
    If($LanguageTag) 
    { 
        Set-WinUILanguageOverride -Language $LanguageTag 
        Write-Host "Successfully change the system display language." 
        #invoke internal function 
        GetChoice 
    } 
}
Prerequisite

Windows PowerShell 2.0 
Windows 7 or higher versionMicrosoft All-In-One Script Framework is an automation script sample library for IT Professionals. The key value that All-In-One Script Framework is trying to deliver is Scenario-Focused Script Samples driven by IT Pros' real-world pains and needs. The team is monitoring all TechNet forums, IT Pros' support calls to Microsoft, and script requests submitted to TechNet Script Repository. We collect frequently asked IT scenarios, and create script samples to automate the tasks and save some time for IT Pros. The team of All-In-One Script Framework sincerely hope that these customer-driven automation script samples can help our IT community in this script-centric move.