Closed krispayne closed 5 years ago
Hey @krispayne - Currently this isn't planned...its been asked for before, but due to the extra prompts Self Service creates on a failed policy, the consensus has been to leave it at an exit 0
and not use error codes.
I haven't tested recently on the latest version of Self Service however. If I get a moment, I will try that and if its better, I'd have no problem implementing that. I just want to ensure more than anything, we provide a positive end-user experience.
Totally understood. End user came up this morning wanting to re run it because it failed due to power but I have the policy set at once per computer. Easy enough for me, and I guess the user would have had the same experience regardless.
The script should report a failed exit status if conditions such as pwrstatus come back as failed.
I was wondering, should this check be done at the end and set the exit status accordingly, or should the script fail in those earlier conditions as soon as they are ERROR ?