I would like to retrieve the session summary stats for an active/running SQL log job for a report - pretty much all the information in the red boxes in the below picture.
I'm mainly interested in the number of successes, warnings, and errors, and the result of the last session for each individual VM/task in the log job.
This is for both agent and VM backup jobs.
I already have a script to list the overall result of a completed SQL log job, but can't work out how to do the above.
https://imgur.com/a/A9h5p4i
Thanks.