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
  • 327

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
  • 704