I can't get the following information in my script :
.BackupStats.BackupSize
.BackupStats.datasize
Here is my code:
Code: Select all
$JobsComputer =Get-VBRComputerBackupJob
foreach ($JobComputer in $JobsComputer)
{
$jname = Get-VBRComputerBackupJobSession -Name "$($JobComputer.Name)?*"
$jname1=$jname | Sort-Object -Descending -Property CreationTime | select -First 1
foreach ($JobComputer in $jname1)
{
Get-VBRTaskSession -Session $JobComputer[0] | Select-Object -Property Name, `
@{Name='Jobname';Expression={$($Sessions.Name)}},
##@{Name='Creationtime2';Expression={$_.Progress.StartTimeLocal}},
@{Name="Creationtime";Expression={$($JobComputer.Creationtime)}},
##@{Name='EndTime2';Expression={$_.Progress.StopTimeLocal}},
@{Name='EndTime';Expression={$($JobComputer.EndTime)}},
@{Name="Result";Expression={$($JobComputer.result)}},
@{Name="State";Expression={$($JobComputer.state)}},
## -----------------------
@{Name="BackupSize";Expression={$_.BackupStats.BackupSize}},
@{Name="DataSize";Expression={$_.BackupStats.datasize}},
##------------------------
@{Name="Heures";Expression={$_.Progress.Duration.Hours}},
@{Name="Minutes";Expression={$_.Progress.Duration.Minutes}},
@{Name="Secondes";Expression={$_.Progress.Duration.seconds}},
@{Name='AvgSpeedMB';Expression={$_.Progress.AvgSpeed}},
@{Name='ProcessedGB';Expression={[math]::Round(($_.Progress.ProcessedUsedSize)/1GB,2)}},
@{Name='DataReadGB';Expression={[math]::Round(($_.Progress.ReadSize)/1GB,2)}},
@{Name='TransferredGB';Expression={[math]::Round(($_.Progress.TransferedSize)/1GB,2)}}
}
}
do you have any idea of my mistake? thank you