Is it possible to send an exit code to SCCM. I am uninstalling and then reinstalling a newer version of Imprivata. If no one is logged in, I want it to send an Exit code of 3010 (reboot required) back to SCCM. I have it using the start-installationrestartprompt when someone is logged in and it brings up the restart prompt and works flawlessly.
It is returning an exit code of 0 when I need it to return an exit code of 3010 if know one is logged in.
Execute-MSI -Path “$dirFiles\x64\ImprivataAgent_x64.msi” -TRANSFORM “$dirFiles\x64\ImprivataAgent_x64.mst” -Passthru
The command line I am using in SCCM is:
Because the Exit Code is 0, the Reboot is not happening when I deploy through SCCM. How would I tell the script to send back error code 3010?