Veeam B&R v10

Hi,

Here are some edits to be compatible with v10.0. Get-VBRJobSchedule and also GetScheduleOptions() returns data from an outdated location.

Replace

if ($status -eq “None”){
$status = (Get-VBRBackupSession -Name $job.name | sort -Descending)[1].Result
}

by

if ($status -eq “None”){
$status = (Get-VBRBackupSession -Name ($job.name.ToString()+’*’) | sort -Descending)[1].Result
}

In v10 the BackupSession’s name parameter includes the type of run (incremental / Full).

Replace

$last = $job.GetScheduleOptions()
$last = $last -replace ‘.*Latest run time: [‘, ”
$last = $last -replace ‘], Next run time: .*’, ”
$last = $last.split(‘ ‘)[0]

by

$last = $job.LatestRunLocal.ToString()
$last.Split(‘ ‘)[0]