Forcing PowerShell errors output in English on localized systems

You can change the pipeline thread’s CurrrentUICulture like so:

[Threading.Thread]::CurrentThread.CurrentUICulture="fr-FR"; Get-Help Get-Process

I’m on an English system but before I executed the line above, I updated help like so:

Update-Help -UICulture fr-FR

With that, the Get-Help call above gave me French help on my English system. Note: if I put the call to Get-Help on a new line, it doesn’t work. Confirmed that PowerShell resets the CurrentUICulture before the start of each pipeline which is why it works when the commands are in the same pipeline.

In your case, you would need to have folks install English help using:

Update-Help -UICulture en-US

And then execute your script like so:

[Threading.Thread]::CurrentThread.CurrentUICulture="en-US"; .\myscript.ps1

Leave a Comment