Return codes from powershell
John Wood
I had previously asked about running powershell scripts from PDQ Deploy and found that this can be done directly. How would you retrieve an installation error code if you did installs this way? Would you just return $error and that is displayed in pdqDeploy?
0
Comments
Still interested in this if anyone knows. Something I was trying was [Environment]::Exit($ExitCode) , but I am not getting anything returned to the Error column. I was thinking that as long as it is successful, it shows nothing in error (even if the code is 0, successful), so I may be having a hard time figuring out if it is returning the code or not.
Nevermind - I think I have it figured out. For msi exit code I did Exit($exitcodevariable) at the end of my script and when there was a non-success it did return it to pdq deploy.
For anyone else who stumbles upon this old question like I did, this article should help:
PowerShell Step Deployments and Error Handling