VMware Cloud Community
EclipseAgent
Enthusiast
Enthusiast
Jump to solution

PowerCLI across vCenters with different languages

I'm having an issue with a PowerCLI script I wrote. The script spans multiple vCenters, but the Guest.GuestFullName and Config.GuestFullName are reported back with ?'s instead of spaces. Other Linux is also being reported back as Autre (Other in French).

Is there a way I can force the host to return the values in english?

0 Kudos
1 Solution

Accepted Solutions
EclipseAgent
Enthusiast
Enthusiast
Jump to solution

I found the resolution.. it being:

$sessionManager = Get-View -Id $global:DefaultVIServer.ExtensionData.Content.SessionManager

$sessionManager.SetLocale("en-US")

View solution in original post

0 Kudos
2 Replies
EclipseAgent
Enthusiast
Enthusiast
Jump to solution

I found the resolution.. it being:

$sessionManager = Get-View -Id $global:DefaultVIServer.ExtensionData.Content.SessionManager

$sessionManager.SetLocale("en-US")

0 Kudos
LucD
Leadership
Leadership
Jump to solution

Did you check what the locale on that vSphere server that returns the messages ?

You can check with the Get-Culture cmdlet.

In PowerShell v3 you can use the Internationalization module and reset the locale with the Set-Culture cmdlet.

But afaik the current PowerCLI doesn't include any localization.

Also have a look at Windows PowerShell 2.0 String Localization

You could consider making your own localization files.


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

0 Kudos