3 Replies Latest reply on Mar 7, 2017 1:10 PM by Gjstewart

    Exit codes for Provisioning Conditionals

    Gjstewart Specialist

      I am having trouble getting the conditionals to work with powershell.


      I can set the Exit code in powershell and have tried calling a script with the following in..


      If (((get-item env:ENV1).Value) -eq "test value") { Exit 20 }


      The exit code is set to 20 in the action and i get never takes the branch..


      I tried using compare variable but the machine does not update the inventory server ( DB ) in time even if i place a full sync scan just after Landesk agent deploy.


      I also tried the command without a script. using just


      Target path and filename



      Command-line parameters

      If (((get-item env:ENV1).Value) -eq "test value") { Exit 20 }


      It runs powershell but ignores the exit code....


      Any ideas?