PowerShell Set-ExecutionPolicy Giving error
If you ever get this error the whole time, do not stress.
Set-ExecutionPolicy : Access to the registry key 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\1\ShellIds\Microsoft.PowerShell' is denied.
At line:1 char:20
+ Set-ExecutionPolicy <<<< Unrestricted
+ CategoryInfo : NotSpecified: (:) [Set-ExecutionPolicy], UnauthorizedAccessException
+ FullyQualifiedErrorId : System.UnauthorizedAccessException,Microsoft.PowerShell.Commands.SetExecutionPolicyCommand
It’s okay, I too have had this issue and I am embarrassed enough to tell you that the reason is that you did not run PowerShell as Administrator when trying to change something that requires Admin access.
Now let’s all take a breath and try again, this time as Administrator.. There we go.
Adrian