Access to the registry key is denied in Powershell
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. Step
Enter Powershell into Search bar
2. Step Hit Enter
3. Step Right-click on the PowerShell icon and click on Run as administrator