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
Next Post
When a bomb beheld  24 Jan 2012
Prior Post
Looking forward to 2012  31 Dec 2011
Related Posts
Automated Inbox Cleanup with PowerShell  30 May 2020
PowerShell provides a helping hand  26 Jan 2019
Bootstrapping a Psake build  01 Sep 2018
A Tale of Minification  17 Feb 2018
A Productivity Prompt for PowerShell  10 Feb 2018
Test Coverage History  18 Nov 2017
Tracking time  11 Nov 2017
The day my build broke  04 Nov 2017
NuGet and .NET Core  28 Oct 2017
.NET Core Builds  21 Oct 2017
More powershell posts »
January 2012