Deployment Solution

 View Only
  • 1.  DS 6.9 Powershell scripts executionpolicy

    Posted Jun 24, 2014 03:25 PM

    When I run a powershell script from the DS 6.9 SP6, either inline using the #powershell designation or from an external ps1 script, it complains that "powershell execution policy is restricted".  

    So using group policy I set computer->Administrative templates->Windows Components->Windows PowerShell->Turn on Script Execution-> Allow all scripts.  If I use get-executionpolicy -list on the client computers, it shows the following.

    • MachinePolicy Unrestricted
    • User Policy     Undefined
    • Process           Undefined
    • CurrentUser      Undefined
    • LocalMachine   Undefined

    If I manually set the LocalMachine policy to Unrestricted, the DS can run the powershell script. However, there doesn't seem to be a GP method of changing the LocalMachine policy. The Microsoft documentation says the exact opposite in that the MachinePolicy from GP should take precidence over all ther others.  Do they have a coding bug? 

    Anyone know how to set this globally or allow DS to run powershell scripts without using a cmd script to call a powershell script?



  • 2.  RE: DS 6.9 Powershell scripts executionpolicy

    Posted Jul 14, 2014 07:36 AM

    You can change the execution policy on client computer by using the jobs available in Samples-> Misc jobs -> Powershell under jobs pane of Win 32 console.

    Screen Shot 2014-07-14 at 10.36.30 AM.png