Correct Region and Language settings with Powershell

The problem:┬áSome users were having issues with Region and Language settings – dates the wrong way around, getting the English (United States) dictionary instead of English (Australia). The server is set up correctly, but some users seem to have settings in their profiles causing problems.

The solution: This may not be the best solution, but it’s the best I could come up with at the time. I couldn’t just set the language to en-AU for all users as some of them deal with overseas clients and speak different languages. I set the following as a logon script for users to do the following:

  • Set Region settings (date/time, numbering etc.) to English (Australia)
  • Check to see if the user has any extra languages set apart from en-AU and en-US
  • If they do, exit the script as they probably want them there
  • If they don’t, set the language to en-AU and remove any additional languages

I had to be a bit creative with the logic. The script checks each individual object in the language list to see if it is NOT EQUAL to en-AU or en-US; it will then exit if it finds a special language. If it doesn’t find any special languages, it will proceed to set the user’s language.

So without further ado, the script. Note that this will only work in Windows Server 2012 and above.

# Script to configure language settings for each user

# Import 'International' module to Powershell session
Import-Module International

# Set regional format (date/time etc.) to English (Australia) - this applies to all users
Set-Culture en-AU

# Check language list for non-US input languages, exit if found
$currentlist = Get-WinUserLanguageList
$currentlist | ForEach-Object {if(($_.LanguageTag -ne "en-AU") -and ($_.LanguageTag -ne "en-US")){exit}}

# Set the language list for the user, forcing English (Australia) to be the only language
Set-WinUserLanguageList en-AU -Force

exit

One thought on “Correct Region and Language settings with Powershell

  1. Not sure if you have found any other ways around this but I am running into something similar. I have a piece of software that is originally in German. On the server I have set the default language to English. If you run the application on the server, it shows everything in English. However, when you publish the application via RDS it always comes up as German. All other apps that are published via this server show in English. I am not able to figure out how to get this one application to show in English like everything else does. en-US is what I want all application to show as.

Leave a Reply

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