In a supervision context, I work on scripts to be alerted when jobs are running for too long.
I make the difference between the start time of the last running job and the current time to get a value in hours, and if this one is higher than X, the check goes to critical.
However, the value that comes out when I run the command "Get-VBRSession -Job $JobCheck -Last" (where $Jobcheck = Get-VBRJob -Name $args[0]) seems to be wrong.
I let you observe the attached screenshot to see the problem.
Am I doing the wrong commands to get the information I want?
Thanks in advance
