If your script generates a non-zero exit status, the job will fail. “return $false” might be confused with “exit 0” from outside PowerShell (because $false -eq 0), meaning “success”.
Ross
--
You received this message because you are subscribed to the Google Groups "rundeck-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
rundeck-discu...@googlegroups.com.
To post to this group, send email to
rundeck...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/rundeck-discuss/4caf6a2a-5d62-4d8d-bbea-5901d2b192d3%40googlegroups.com.
For more options, visit
https://groups.google.com/d/optout.
To be clear: It’s the script’s exit status that Rundeck cares about, nothing else. Try this:
if ($TheThingWereTryingToDoDidntWork) {
exit 1
To view this discussion on the web visit https://groups.google.com/d/msgid/rundeck-discuss/f3058beb-6366-4706-b510-67f5caa4e90d%40googlegroups.com.