ExecutionPolicy Restricted MachinePolicy

Comments

1 comment

  • SelfMan

    Hi maki,
    I am using a batch script:

    reg add HKLM\SOFTWARE\Microsoft\PowerShell\1\ShellIds\Microsoft.PowerShell /v "ExecutionPolicy" /d "Unresticted" /t "REG_SZ" /f
    powershell -executionPolicy bypass -noexit -file "powershell-script.ps1"
    reg add HKLM\SOFTWARE\Microsoft\PowerShell\1\ShellIds\Microsoft.PowerShell /v "ExecutionPolicy" /d "Resticted" /t "REG_SZ" /f

    0
    Comment actions Permalink

Please sign in to leave a comment.