How to make PowerShell output error messages in English

If you want to see a PowerShell output (e.g. an error message) in english instead of your local language, prefix your command by

example.txt
[Threading.Thread]::CurrentThread.CurrentUICulture = 'en-US';

For example, in order to run to run My-Cmdlet -Arg 1 with output in English instead of your local language, use

example.txt
[Threading.Thread]::CurrentThread.CurrentUICulture = 'en-US'; My-Cmdlet -Arg 1

[Threading.Thread]::CurrentThread.CurrentUICulture only affects the current command and does not have any effect for other commands. Hence your need to copy the command before each and every command for which you want to see the output in English.

Possibly you also need to install the English help files in order to see more messages in English. In order to do that, run this command in PowerShell as an administrator:

example.txt
Update-Help -UICulture en-US

 


Check out similar posts by category: PowerShell, Windows