Ah, that's something we will take into consideration. Some customers are on version 8.5 and some on 9.5 but no update 2 as far as I know so we will look into that.
One more thing I need figured out:
A) If last job is failed or in warning report it.
B) If last job is still running ignore that job and check the job before that one.
C) If last job was Success ignore failed/warnings from previous jobs in timeframe.
This is wat I currently have which I think covers requisite A (first -1) and B (state eq stopped), but not C. Any eyes on this would be great.
Code: Select all
# Get Veeam backup sessions where $date equals yesterday (as an example)
$vbrSessions = Get-vbrBackupSession | where {$_.creationTime -gt $date -and $_state -eq "stopped"} | Sort creationtime -Descending
Foreach ($vbrJob in $vbrJobs) {$jobs += $vbrSessions | where {$_.jobName -eq $vbrjob.name -and $_.result -ne "Success" -and $_.result -ne "None"} | Sort creationtime -Descending | select Name, CreationTime, Result -first 1}