Powershell – Access to the Registry Key is Denied

Do you get the message “Access to the registry key is denied” when you are trying to change some policies in Powershell? Here’s what you have to do.

The Execution Policy of Powershell prevents that people can run untrusted scripts on your PC. This is a good feature and helps to protect you from unwanted changes.

Because of this the policy can only be changed by an administrator.

Solution: If you get the message:

"Access to the registry key HKEY_LOCAL_MACHINE\Microsoft\PowerSHell\1\Shellds\Microsoft\.PowerSHell is denied"

Running PowerShell As Admin

You need to run PowerShell as administrator.

1. Enter Powershell into Search bar;

2. Hit Enter;

3. Right-click on the PowerShell icon and click on Run as administrator;

SOURCE

LINK

LANGUAGE
ENGLISH