Could not change ExecutionPolicy from ByPass

Welcome Forums General PowerShell Q&A Could not change ExecutionPolicy from ByPass

This topic contains 2 replies, has 2 voices, and was last updated by

3 years ago.

  • Author
  • #35268

    Points: 0
    Rank: Member

    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
    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:

    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:
    1) Why doesn't the Get_ExecutionPolicy cmdlet show me the actual ExecutionPolicy and more importantly
    2) 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.

  • #35328

    Points: 1,811
    Helping HandTeam Member
    Rank: Community Hero

    Have you run "Get-ExecutionPolicy -List" as the error suggests?

    Are you being impacted by a Group Policy that perhaps sets this? Or is there a profile script that's setting this each time the shell runs?

  • #35467

    Points: 0
    Rank: Member

    There are so many tons of documentation I guess I hoped I could pick of this aspect of PS quickly. Nope, gotta dig into. That is fine, because I would rather understand it more thoroughly than less thoroughly.

The topic ‘Could not change ExecutionPolicy from ByPass’ is closed to new replies.

denizli escort samsun escort muğla escort ataşehir escort kuşadası escort