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).

Comments

blog comments powered by Disqus
Next Post
When a bomb beheld  24 Jan 2012
Prior Post
Looking forward to 2012  31 Dec 2011
Related Posts
Browsers and WSL  31 Mar 2024
Factory methods and functions  05 Mar 2023
Using Constructors  27 Feb 2023
An Inconvenient API  18 Feb 2023
Method Archetypes  11 Sep 2022
A bash puzzle, solved  02 Jul 2022
A bash puzzle  25 Jun 2022
Improve your troubleshooting by aggregating errors  11 Jun 2022
Improve your troubleshooting by wrapping errors  28 May 2022
Keep your promises  14 May 2022
Archives
January 2012
2012