I have a PowerShell script that I wrote on an Windows 7 workstation that has English as the OS language. Script works without issue. If I run the same script on a Windows 7 workstation that has French as the OS language, I receive non-terminating errors when the script runs and tries to call the Trim method of the string class. The error I receive (translated to English) is “Calling the method failed because [System.String ] does not contain a method called ‘Trim’”
The English workstation has PS 4.0 installed. The French workstation has PS 2.0 installed.