Category Archives: Windows 8.1

PowerShell Tools for Visual Studio 2013 – unable to run and/or debug PowerShell script – execution policies problem

The problem :

Some time ago I wrote this article :

about my problems running and debugging PowerShell scripts in VS 2012 with help of – PowerShell Tools for Visual Studio 2012 – wonderful tool by Adam Driscoll.

Currently after switching to Windows 8.1 + VS 2013 I reopened my project and started to work with new version of PowerShell Tools for Visual Studio 2013 –

And  I was shocked! The very same problem got even worse! I wasn’t able to fix this with steps in the article. I was able to edit scripts in VS but still, I wasn’t able to debug my stuff. After some messing with other stuff I found out, that the very same problem was here some time ago and is already fixed by another people – with help of this link : (yes, it was the same back then in 2011)….

Solution to the problem is quite simple :

PowerShell installs in one package however there are two versions : x86 and x64 (as separate executables that I had to find on my drive) and as you might guessed correctly : they don’t share the same Get-ExecutionPolicy setting!

So you need to :

  • Find x64 version of PowerShell
  • set ExecutionPolicy

On my machine while running VS2013 as 32b executable :

vs 2013 32b

And with the starting position like this (please note that there is no difference in title bars, you only can tell what PS you are using by the path):

ps two versions


I Set-ExecutionPolicy to RemoteSigned like this :

ps two versions 64 fixed


and the output in VS 2013 changed from this :

vs ps error


to this :

vs ps fixed


No PowerShell package on my box in add/remove programs :

I have to state 1 small thing at the end, I didn’t installed PowerShell on my box as a downloaded .exe file.  If I search my installed programs, I see this (nothing) :

ps uninstall


While I can see PowerShell 2.0 in add/remove feature in Windows 8.1 like this :

ps feature

So your box setup may vary. If so, please comment below for others… Thank you! 🙂

Hope this helps/saves you some time….