Code: Select all
$JobSessions = [Veeam.Backup.Core.CBackupSession]::GetByJob($Job.Id)
Then, I can get the desired information with:
foreach($Session in $JobSessions)
{
If ($Session.SessionInfo.SessionAlgorithm -eq "SynteticFull" -and
$Session.SessionInfo.Result -eq "Success")
{
Write-Host($Session.CreationTime, $Session.JobName)
}
}
I have also used the cmdlet "Get-VBRBackupSession" to get the Backup/Backup Copy/Replica job sessions, and the cmdlet "Get-VBREPSession" to get the Agent for Microsoft Windows jobs session.
Why does "$Session.SessionInfo.SessionAlgorithm" returns always "Unknown"? Is there any way to workaround it?
Thank you