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
Coverage History with Psake  18 Nov 2017
Tracking time with Psake  11 Nov 2017
The day my Psake build broke  04 Nov 2017
NuGet, .NET Core and Psake  28 Oct 2017
.NET Core with Psake  21 Oct 2017
Test Coverage Reporting with Psake  07 Oct 2017
Test Coverage with Psake  30 Sep 2017
NuGet packaging with Psake  23 Sep 2017
Semantic versioning with Psake  16 Sep 2017
Versioning with Psake  09 Sep 2017
More powershell posts »
Related Pages
January 2012 archive