In VS2013, when I try to open the NuGet Package Manager Console, I suddenly get the error:
Windows PowerShell updated your execution policy successfully, but the setting is overridden by a policy defined at a more specific scope.
Due to the override, your shell will retain its current effective execution policy of Unrestricted. Type "Get-ExecutionPolicy -List" to view your execution policy settings. For more information please see "Get-Help Set- ExecutionPolicy".
If I run 'Get-ExecutionPolicy -List' in a PowerShell prompt, I get the following:
Scope ExecutionPolicy
----- ---------------
MachinePolicy Unrestricted
UserPolicy Unrestricted
Process Unrestricted
CurrentUser RemoteSigned
LocalMachine Undefined
Not sure it this is correct or not, but on my co-workers PC, the policies are set to:
Scope ExecutionPolicy
----- ---------------
MachinePolicy Unrestricted
UserPolicy Undefined
Process Unrestricted
CurrentUser RemoteSigned
LocalMachine Undefined
Guess the problem is the 'UserPolicy' so I've tried to execute the following command:
Set-ExecutionPolicy Undefined -Scope UserPolicy
which gives me the error-message:
Set-ExecutionPolicy : Cannot set execution policy. Execution policies at the MachinePolicy or UserPolicy scopes must be set through Group Policy.
Not quite sure what to do now. Any help to fix this problem would be greatly appreciated.