4
Vote

Set-EnglishLocales > $global:currentThread

description

It seems that there is an issue with Set-EnglishLocales where the $global:currentThread is being used to set the CurrentCulture and the CurrentUICulture for the currentThread.

I get the exception as following on it:
The variable '$global:currentThread' cannot be retrieved because it has not been set.
No, I tried to fix this by setting the missing value before initialization, this way:
$global:currentThread = [System.Threading.Thread]::CurrentThread
$global:currentThread.CurrentCulture = $usenglishLocales
$global:currentThread.CurrentUICulture = $usenglishLocales

comments