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?
I found the resolution.. it being:
$sessionManager = Get-View -Id $global:DefaultVIServer.ExtensionData.Content.SessionManager
$sessionManager.SetLocale("en-US")
I found the resolution.. it being:
$sessionManager = Get-View -Id $global:DefaultVIServer.ExtensionData.Content.SessionManager
$sessionManager.SetLocale("en-US")
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