Change Execution Policy in the Registry
When executing scripts you may encounter errors
A common error occurs during the all important ‘Set-ExecutionPolicy’ call –
Set-ExecutionPolicy : Access to the registry key ‘HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\1\ShellIds\Microsoft.PowerShell’ is denied. + Set-ExecutionPolicy <<<< RemoteSigned |
This usually happens when you have certain permissions defined on your machine.
To modify ‘ExecutionPolicy’ directly without executing from script we can hack the registry directly where powershell is registered
Method
|
The value can be one of four:
|
Advertisements
Thank You, this is exactly what I was looking for. Also make sure you are running PowerShell in Admin mode.
Hi,
Thanks for the post this was very helpful.
There are a couple of caveats here such as if Group Policy is used then these settings are ignored. There are a couple of additional values for newer versions of PowerShell which I mentioned here.
http://david-homer.blogspot.co.uk/2015/01/using-regedit-to-view-and-set.html?showComment=1421841024440#c3741975792417314596
Dave
Hi,
Thanks for the post this was very helpful.
There are a couple of caveats here such as if Group Policy is used then these settings are ignored. There are a couple of additional values for newer versions of PowerShell which I mentioned here.
http://david-homer.blogspot.co.uk/2015/01/using-regedit-to-view-and-set.html
Dave
Works perfectly. Thank you sooou much.
YUPPPPPPPPPPPPPPPPP. TY 😀