1

I am trying to set the script execution policy in PowerShell.

But when I tried, I get:

PS C:\Users*> Get-ExecutionPolicy

Restricted

PS C:\Users*> Set-ExecutionPolicy RemoteSigned

PS C:\Users*> Get-ExecutionPolicy

Restricted

I tried to run in admin mode, but no difference.

Colliot
  • 257
  • 5
  • 8
  • possible duplicate of [Why setting Powershell to set-executionpolicy remotesigned fails?](http://superuser.com/questions/158974/why-setting-powershell-to-set-executionpolicy-remotesigned-fails) – DavidPostill Jul 04 '15 at 19:08

1 Answers1

2

First, make sure you run PowerShell prompt as Administrator, or the proper access to the registry key 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\1\ShellIds\Microsoft.PowerShell' will be denied.

Afterwhich, try setting it using-force, or set-ExecutionPolicy RemoteSigned -Force.

bentek
  • 694
  • 3
  • 12