Idea Details

#FOKUS: Why do we have to set the boilerplate code for windows?

Last activity 02-13-2020 01:03 PM
Carsten Schmitz's profile image
10-09-2019 11:23 AM

​Why do we have to set the boiler plate code regarding %errorlevel% and friends for Windows - can't Automic be instructed to include that code at the end of the generated job, or is there some other way of freeing the users from this requirement?

I have repeatedly seen Windows jobs that didn't include the code and consequently, show ENDED_OK in Automic even when they were not. Relying on templates and/or copy/paste isn't the most user friendly design.

Same for Powershell: I have recently discovered that our users start calling the job messenger on their own in their Powershell jobs to pass return codes for PS jobs. They even go as far as determining the server's IP address to be included in the "fake" (sort of) job messenger calls. Is this really by design?

For some reason I can't comprehend, JOBS with PS do require this (or some other extra code) to pass their state back to Automic, or else will be ENDED_OK no matter what. That is UNLESS one sets $ErrorActionPreference = "Stop", in that case a failing Powershell job triggers some sort of ENDED_NOT_OK without any extra code.

I think the whole requirement for boilerplate code in Windows jobs should be eliminated somehow.