Somehow, I got my PowershellISE with ISESteroids (Win 7 Pro 64) in a state where Get-ExceptionPolicy = ByPass, and I could do nothing that would change that.
Well, sort of…
I then ran:
Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy RemoteSigned
AND I GOT THIS ERROR IN RED.
Windows PowerShell updated your execution policy successfully, but the setting is overridden by a policy defin
ed at a more specific scope. Due to the override, your shell will retain its current effective execution poli
cy of Unrestricted. Type “Get-ExecutionPolicy -List” to view your execution policy settings. For more informat
ion please see “Get-Help Set-ExecutionPolicy”. (raised by: Set-ExecutionPolicy)
So that tells me my change did not take effect. Which is evidenced when I ran this cmdlet:
Get-ExecutionPolicy
Unrestricted
So it is unrestricted. That certainly is not what I asked for: RemoteSigned.
BUT the registry says the ExecutionPolicy is RemoteSigned here: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\1\ShellIds\Microsoft.PowerShell\ExecutionPolicy.
So the questions become:
- Why doesn’t the Get_ExecutionPolicy cmdlet show me the actual ExecutionPolicy and more importantly
- How can I work with the the ExecutionPolicy so that it will seem like less of a black box that gives me whatever it feels like giving me, and more of a logical input output tool. Afterall, it has far reaching effects on what I can do.