Custom error text for specific error codes
Hello,
is there any way to get a custom text to an error code in the deployment overview?
E.g. instead of "Deploy-Application.ps1 returned error code 1618" I'd like to see "User deferred installation" or something. With PSADT, this "error" occurs very often and I'd like to see at first glance if it's really an error or just one of these infos.
0
Comments
Is the "user deferred installation" message included in the output log? The Error returned doesn't display the full error message by default and will return the return code, like you experienced.
Depending on what you are trying to do, you could consider using a PDQ Inventory collection to contain certain machines, or you could add 1618 to the success codes for the package depending on how it works.
As an aside, I'm curious to hear how you are using PSADT and how it is helpful for you.
No it's not included directly. There's a line in the log saying that the user deferred the installation, but it's somewhere else than the exit code. So I was thinking that it probably might be possible to do a custom code mapping in PDQ itself, but it doesn't look like it. It would just be a cosmetic thing, I got the deployment logic covered, it just tries updating every few hours until successful.
My main reason for PSADT is the ability to ask if an application may be closed for updating - our user would go mad if their applications would force close while they're working, and I haven't looked into building that with PDQ itself yet.
Please sign in to leave a comment.