Getting regional settings /language setting from wmi

Welcome Forums General PowerShell Q&A Getting regional settings /language setting from wmi

This topic contains 3 replies, has 3 voices, and was last updated by

 
Participant
2 years, 7 months ago.

  • Author
    Posts
  • #37893

    Participant
    Points: 0
    Rank: Member

    I am just wondering what the class name is to find the regional settings of a Windows OS? I am using it for a report. I am preferring wmi because at the moment we have servers that are still using powershell v2 and they don't want to upgrade to the latest version just yet.

    Any help appreciated.

  • #37898

    Participant
    Points: -19
    Rank: Member

    Hi,
    I dont think you'll find it via wmi.
    Regional data is stored in the registry per profile, not per computer.
    You can look at the registry to get the data you want, it will be under hkey_current_user or hkey_users\ and then Control Panel\International

  • #37899

    Participant
    Points: 4
    Rank: Member

    Win32_Operating system is probably your best bet, using the CountryCode, Locale and OSLanguage properties.

    You'll probably want to translate the codes used into words (e.g. English_United_Kingdom is stored as 0809) but the lists are easy to find online and you can build a lookup table for your script.

  • #37902

    Participant
    Points: -19
    Rank: Member

    Although country code might hint the regional, the locale and OSLangugae definitely dont relate to regional settings. I could have a Arabic locale windows and Arabic interface, but my regional would be Yemen, or Saudi Arabia, or others.

The topic ‘Getting regional settings /language setting from wmi’ is closed to new replies.