Link to home
Start Free TrialLog in
Avatar of Simon336697
Simon336697Flag for Australia

asked on

Reading a csv file with powershell

Hi guys hope you are all well.

Guys. we have a requirement to find the locale for the OS, and we can find it by doing the following:

PS C:\Documents and Settings\test> gwmi win32_operatingsystem | select locale

locale
------
0c09


From the following article:

http://msdn.microsoft.com/en-us/goglobal/bb964664

You can look up the value of the hex value to find the language.

My question is this.

If we use

gwmi win32_operatingsystem | select locale

to first find the locale, which in our case is 0c09

Can we then read a csv file which contains the following table:


 User generated image
to find the Language - Country/Region value,

so, by first finding out with

gwmi win32_operatingsystem | select locale

the locale is 0c09

Can we then look up the csv file and first find 0c09 in column 2 LCID Hex, and return its corresponding value in column 1, which is English - Australia.

Any help greatly appreciated.
ASKER CERTIFIED SOLUTION
Avatar of amit_g
amit_g
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Simon336697

ASKER

Guys thank you both so much happy new year to you both.