I am testing a Powershell scirpt on Win 10 machine with Powershell ISE run as administrator and I am the administrator of my PC. Specifically
this script. Every time I try to run the script I get the dreaded message: "... is not digitally signed. You cannot run
this script on the current system. For more information about running scripts and setting execution policy, see about_Execution_Policies at ..."
I've tried running the following and nothing seems to work:
set-executionpolicy unrestricted
Set-ExecutionPolicy ByPass
Set-ExecutionPolicy RemoteSigned
Set-ExecutionPolicy -ExecutionPolicy ByPass -Scope CurrentUser
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Unrestricted
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
Set-ExecutionPolicy -Scope MachinePolicy -ExecutionPolicy Bypass
Get-ExecutionPolicy -List currently displays the following after all my tests:
Scope ExecutionPolicy
----- ---------------
MachinePolicy RemoteSigned
UserPolicy Undefined
Process Undefined
CurrentUser Bypass
LocalMachine Unrestricted
I noticed that it won't let me change UserPolicy nor Process. I get the following message:
Set-ExecutionPolicy -Scope Process -ExecutionPolicy ByPass
Set-ExecutionPolicy : Windows PowerShell updated your execution policy successfully, but the setting is overridden by a policy defined at a more specific scope. Due
to the override, your shell will retain its current effective execution policy of RemoteSigned.