I have a Powershell distribution package that consists of 1 script. The script returns an exit code which LANDESK logs but does not use when determining if the task is successful or failed. Please see the below log I have captured:
Thu, 22 Jun 2017 11:06:10 PowerShell file Client Thread
Thu, 22 Jun 2017 11:06:10 file exists check runtime
Thu, 22 Jun 2017 11:06:10 runtime version: v2.0.50727
Thu, 22 Jun 2017 11:06:14 PowerShell script output: T1647
Thu, 22 Jun 2017 11:06:14 Installation result -1917517824
Thu, 22 Jun 2017 11:06:14 RunPackageInstall: stop on returncode=8db50000 of package=[INFRA]-Uninstall-KB3203467
Thu, 22 Jun 2017 11:06:14 processing of package is complete, result -1917517824 (0x8db50000 - code 0)
As you can see my Powershell script output is: T1647 which is indicative of a failure but LANDESK ignores this and instead returns code 0. It is as if LANDESK only cares about if Powershell.exe has executed the script successfully and does not pay attention to the result of the script itself.
Is there anything I can do please to fix this? I want LANDESK to use the Powershell script output code as the result to determine if the scheduled task was successful or not.