I have single veeam backup policy with contains of 10 VMs.
How we can get backup status for each VM to knowing the VM is backup is successful or not using powershell?
I have single veeam backup policy with contains of 10 VMs.
How we can get backup status for each VM to knowing the VM is backup is successful or not using powershell?
Best answer by Dynamic
After asking ChatGPT again and tweaking the output to this….
# Load Veeam PowerShell Snap-In
Add-PSSnapin VeeamPSSnapIn -ErrorAction SilentlyContinue
# Job name
$jobName = "NAMEOFYOURJOB"
# Get the job
$job = Get-VBRJob -Name $jobName
if ($job -eq $null) {
Write-Host "Backup job '$jobName' not found."
return
}
# Get the latest session of the job
$lastSession = $job.FindLastSession()
if ($lastSession -eq $null) {
Write-Host "No sessions found for job '$jobName'."
return
}
# Get all processed VMs in the last session
$sessionObjects = Get-VBRBackupSession -Id $lastSession.Id |
Get-VBRTaskSession |
Where-Object {$_.Info.Progress -ne $null} |
Select-Object @{Name="VMName";Expression={$_.Name}},
@{Name="Status";Expression={$_.Status}},
@{Name="Result";Expression={$_.Info.Result}},
@{Name="ProcessedSize(GB)";Expression={[math]::Round($_.Info.Progress.ProcessedSize/1GB, 2)}},
@{Name="TransferredSize(GB)";Expression={[math]::Round($_.Info.Progress.TransferedSize/1GB, 2)}}
# Output
$sessionObjects | Format-Table -AutoSize
you will get this:

Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.