I need to run some PowerShell scripts across various operating systems. Most of them are in English version, however, some are localized for example German, French, Spanish, etc. The problem is local system administrators mostly do not now PowerShell and in the case the script fails and throws an error at them, instead of reading it they just send screenshots of such error messages to me and if the cause to this error is not obvious I am stuck with typing it to g. translate to find out what is going on.
Is there a switch I can run the whole script or single command with or a parameter or any other way to force errors in PowerShell to be displayed in English instead of the language that is default for that particular machine?
$ENUS="[Threading.Thread]::CurrentThread.CurrentUICulture = 'en-US'"
theninvoke-expression $ENUS; Get-Help Get-Process
"invoke-expression $ENUS;" is little shorter if you need to run many commands. – Barthel