Installing the PowerShell Tools for Visual Studio ( on a home machine I found I was getting the following error:

Error Message

Even though I had set the execution policy. The solution it turns out is to run the set-executionpolicy is to not run it in PowerShell but the old CMD shell like below (Note it’s not a good idea to use unrestricted!)

c:\windows\syswow64\WindowsPowerShell\v1.0\powershell.exe -command set-executionpolicy unrestricted