Option #1: Using Info.IncludedSize
Code: Select all
$Job = get-vbrjob -Name "Backup_SQLservers"
$Jobsize = [math]::round($Job.Info.IncludedSize /1GB, 2)
Code: Select all
$Job = get-vbrjob -Name "Backup_SQLservers"
$Job.GetObjectsInJob() | Foreach-object {$jobsize = $jobsize + ($_.ApproxSizeString)}
Option #2 returns value but it is not exact size of the VMs in the job. It is less than what I see in the GUI wizard of the job properties.
Could someone advise what is the best way to calculate the size of VMs in the backup job?