VMware Cloud Community
ekrejci
Enthusiast
Enthusiast
Jump to solution

some objects properties are in current language instead of English

Hello,

I'm running PowerCLI for some times now and I'm having some "interesting" new behavior with language. Not scripting one, but spoken.

My desktop is set to use French local settings for keyboard and Formats.

When I run PowerCLI now, I'm having value that return in French.

For example:

$vm = Get-VM -Name "VM-NAME"

$vmNics = $vm | Get-NetworkAdapter

In the list of the $vmNics I have "Adaptateur réseau 1" instead of "Network Adapter 1"

This is strongly annoying because I'm retrieving tones of info for reporting purpose that I want to produce in English.

I suppose this came with the latest release of PowerCLI as nothing changed on my vCenter or desktops for several months.

Any clue?

Thank you

Eric

Reply
0 Kudos
1 Solution

Accepted Solutions
admin
Immortal
Immortal
Jump to solution

Hi, ekrejci,

Is it possible that your server's locale is French? The described behaviour could be caused by the server returning information in French since you say only some text is in French.

You can check what your default locale when talking to the server is:

Connect-VIServer xx.xx.xx.xx

$si = get-view ServiceInstance

$sm = Get-View $si.Content.SessionManager

$sm.DefaultLocale

You can set it to en-US only immidiately after connecting (It appears that setlLocale works only when executed immediately after connect-viserver):

Connect-VIServer xx.xx.xx.xx

#don’t run any other cmdlets between the Connect-VIServer and the SetLocale below

$si = get-view ServiceInstance

$sm = Get-View $si.Content.SessionManager

$sm.SetLocale("en_US")

Hope this helps you resolve your issues.

View solution in original post

Reply
0 Kudos
10 Replies
LucD
Leadership
Leadership
Jump to solution

What does

Get-Culture

return ?


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

ekrejci
Enthusiast
Enthusiast
Jump to solution

Hi LucD,

it returns:

LCID      Name           DisplayName

----           ----                -----------

2057      en-GB           English (United Kingdom)

Eric

Reply
0 Kudos
LucD
Leadership
Leadership
Jump to solution

A long shot, but check if this returns any DLLs which don't have the Culture=neutral text.

[appdomain]::currentdomain.getassemblies() |

where {$_.FullName -like "VMware*"}|

Select FullName


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

ekrejci
Enthusiast
Enthusiast
Jump to solution

The result:

FullName

--------

VMware.VimAutomation.ViCore.Cmdlets, Version=5.0.0.0, Culture=neutral, PublicKeyToken=null

VMware.VimAutomation.ViCore.Util10Ps, Version=5.0.0.0, Culture=neutral, PublicKeyToken=null

VMware.VimAutomation.Sdk.Util10Ps, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null

VMware.VimAutomation.Sdk.Util10, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null

VMware.VimAutomation.Sdk.Types, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null

VMware.VimAutomation.Sdk.Interop, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null

VMware.VimAutomation.ViCore.Interop, Version=5.0.0.0, Culture=neutral, PublicKeyToken=null

VMware.VimAutomation.ViCore.Types, Version=5.0.0.0, Culture=neutral, PublicKeyToken=null

VMware.Vim, Version=5.0.0.0, Culture=neutral, PublicKeyToken=10980b081e887e9f

VMware.VimAutomation.Sdk.Impl, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null

VMware.VimAutomation.ViCore.Impl, Version=5.0.0.0, Culture=neutral, PublicKeyToken=null

VMware.VimAutomation.ViCore.Util10, Version=5.0.0.0, Culture=neutral, PublicKeyToken=null

VMware.VumAutomation, Version=4.1.0.5395, Culture=neutral, PublicKeyToken=null

VMware.VumAutomation.Types, Version=4.1.0.5395, Culture=neutral, PublicKeyToken=null

VMware.DeployAutomation, Version=5.0.0.1024, Culture=neutral, PublicKeyToken=null

VMware.ImageBuilder, Version=5.0.0.1024, Culture=neutral, PublicKeyToken=null

VMware.VimAutomation.License, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null

VMware.VimAutomation.Cloud.Commands, Version=1.5.0.0, Culture=neutral, PublicKeyToken=null

VMware.VimAutomation.Cloud.Views, Version=1.5.0.0, Culture=neutral, PublicKeyToken=null

VMware.VimAutomation.Cloud.Impl, Version=1.5.0.0, Culture=neutral, PublicKeyToken=null

VMware.VimAutomation.Cloud.Interop, Version=1.5.0.0, Culture=neutral, PublicKeyToken=null

VMware.VimAutomation.Cloud.Types, Version=1.5.0.0, Culture=neutral, PublicKeyToken=null

VMware.Security.CredentialStore, Version=5.0.0.0, Culture=neutral, PublicKeyToken=null

VMware.VimAutomation.Logging.SoapInterceptor, Version=5.0.0.0, Culture=neutral, PublicKeyToke...

seems that every DLL are set with Culture=neutral

Eric

Reply
0 Kudos
admin
Immortal
Immortal
Jump to solution

Hi, ekrejci,

Is it possible that your server's locale is French? The described behaviour could be caused by the server returning information in French since you say only some text is in French.

You can check what your default locale when talking to the server is:

Connect-VIServer xx.xx.xx.xx

$si = get-view ServiceInstance

$sm = Get-View $si.Content.SessionManager

$sm.DefaultLocale

You can set it to en-US only immidiately after connecting (It appears that setlLocale works only when executed immediately after connect-viserver):

Connect-VIServer xx.xx.xx.xx

#don’t run any other cmdlets between the Connect-VIServer and the SetLocale below

$si = get-view ServiceInstance

$sm = Get-View $si.Content.SessionManager

$sm.SetLocale("en_US")

Hope this helps you resolve your issues.

Reply
0 Kudos
ekrejci
Enthusiast
Enthusiast
Jump to solution

Hi orainovea

You are right.

I will get in contact with the system admins running our vCenter and ask them to change its local settings to English.

Meanwhile I will set the Local right after the "connect-viserver" as you mentioned.

Thank you very much guys for your help

Eric

P.S. do you know since when is this side effect happening?

Reply
0 Kudos
ekrejci
Enthusiast
Enthusiast
Jump to solution

by the way I also had this local language settings issue with the VMware vCenter Server Appliance after having set the timezone I guess.

Eric

Reply
0 Kudos
admin
Immortal
Immortal
Jump to solution

I think the "side effect":) has been around a while - it's just that the VC doesn't know what language to use to talk to you so it uses it's default (which, apparently, is French). Once you change the default for the connection, you're good.

Hope your admins will be able to change the VC locale for you,

Ogniana

Reply
0 Kudos
ekrejci
Enthusiast
Enthusiast
Jump to solution

They changed it and now it's working in the desired language.

Anyway thank you again guys for having help me out.

Eric

Reply
0 Kudos
LordISP
Enthusiast
Enthusiast
Jump to solution

please note a reboot might be reqired before that change takes effect

Thanks

Rafael

http://rafaelcamison.wordpress.com http://communities.vmware.com/people/LordISP/blog
Reply
0 Kudos