Problem with UI Culture

Regular Visitor

In my organisation we have identified a problem when trying to identify the current UI language.

 

In powershell you can use $PSUICulture ( from some version ) or Get-UICulture to identify the language of the UI. This is true if it run by a user or admin of the computer. If the same variable or command is used by SYSTEM you get something else.

 

This is the setup:

  1. Refimage installed with en-US 1903 iso, installed languge pack sv-se (from language-iso)
  2. Deployed using unattend.xml and settings of:
    1. <InputLocale>041d:0000041d</InputLocale>
    2. <SystemLocale>sv-SE</SystemLocale>
    3. <UILanguage>en-US</UILanguage>
    4. <UserLocale>sv-SE</UserLocale>
  3. Logged in as the user the windows UI is presented in english and everything looks good
    1. Run powershell.exe as regular user and run "Write-Host $PSUICulture" which returns "en-US"
    2. Run powershell.exe as SYSTEM and run "Write-Host $PSUICulture" which returns "sv-SE"

output from dism:

Deployment Image Servicing and Management tool
Version: 10.0.18362.1

Image Version: 10.0.18362.778

Reporting online international settings.

Default system UI language : en-US
System locale : sv-SE
Default time zone : W. Europe Standard Time
Active keyboard(s) : 041d:0000041d
Keyboard layered driver : Not installed.

Installed language(s): en-US
  Type : Fully localized language.
Installed language(s): sv-SE
  Type : Partially localized language, MUI type.
  Fallback Languages en-US

The operation completed successfully.

Is there something wrong with my configuration or is the command simply returning the wrong value?

 

0 Replies