I'm a relatively recent convert to Windows Powershell, and I seriously love it: power beyond what I understand, it's obvious that this has a future.
The surprise: in 64-bit Windows 7, there are two sets of Powershell settings, one each for x86 and x64.
This came up while building software: I was in "regular" Powershell (which appears to be 64-bit), and had configured the ExecutionPolicy for RemoteSigned; this allows me to run local unsigned .ps1 scripts.
Running the batch build with devenv command (the cmdline mode of Visual Studio), it would consistently fail with a cannot-run-scripts error due to the ExecutionPolicy. It was starting to make me crazy, until my Bingle skills pointed me to a helpful post by fellow MVP Shay Levy (found here).
VS is probably launching the x64 version of PowerShell. x64 machines have two PowerShell shortcuts, launch the x64 console and set the execution policy.
I suspect that's actually backwards—the "native" Powershell appears to be x64, while Visual Studio (a 32-bit application) is likely launching the x86 version—but in any case the fact that there are two sets of knobs fixed my problem exactly.
To change the ExecutionPolicy, one must do right-click + Run As Administrator on each of them (you're running as a limited user, right?) for each of them, and I made it a point to change the console window background to red for both Admin-esque programs (so I can tell when I have the elevated credentials).
I do have a pretty good idea why there are two different executable, but I'm not sure I understand why they have separate sets of knobs: I think this constitutes a surprise.




