Here’s a PowerShell trap that needs better publicity - if you have both x64 and x86 versions of PowerShell installed (say, as you would on Windows Server 2008 R2), their security policies are independent.

If you’ve opened one powershell window and changed your execution policy thusly:

PS C:\> set-executionpolicy remotesigned
Execution Policy Change
The execution policy helps protect you from scripts that you do not trust. 
Changing the execution policy might expose
you to the security risks described in the about_Execution_Policies help topic.
Do you want to change the execution policy?
[Y] Yes  [N] No  [S] Suspend  [?] Help (default is "Y"): y
PS C:\>

Then that policy changes affects only that environment - doing this at the 32 bit PowerShell command prompt has no effect on running scripts with 64 bit PowerShell, and vice versa.

It’s possible to have loosened things for the x86 environment while the x64 environment is still locked tight (or vice versa).


blog comments powered by Disqus