I’m trying to get historic data of executed actions, including the exit code and the executed command. Does anyone know how to do this? Maybe I’m over complicating it.
I can get the last action from the DB with this…
,replace(c.ComputerName,char(10),’’) as ComputerName
FROM COMPUTERS c
join actionresults ar on ar.ComputerID = c.ComputerID
where c.ComputerName = ‘ABC123’ + char(10)
and c.IsDeleted = 0
order by computername
It shows only details of the last action.
It increments the “ar.TryCount” and “ar.RetryCount” values, but it appears there’s no history being maintained for previous attempts.