I wrote a simple batch file as a PowerShell script, and I am getting errors when they run.
It\'s in a scripts directory in my path. This is the error I get:
Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope Process
The above command worked for me even when the following error happens:
Access to the registry key 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\1\ShellIds\Microsoft.PowerShell' is denied.