Let me know your thoughts
Very interesting and another Powershell script which is always nice for automated tasks. Will test it out and provide feedback.
Let me know your thoughts
Let me know your thoughts
You may want to make the link to your GitHub repo clickable. It is not right now and you need to copy/paste. 
Sure i will make it
Let me know your thoughts please
@Veeam Administrator
@Chris.Childerhose ...Did you get time to check my script please
Great work @surenthiran The job type filtering and restore point logic are very practical.
@Veeam Administrator
@Chris.Childerhose ...Did you get time to check my script please
@surenthiran
I ran each report -
Agent report - it ran but did not gather any data at all - file is blank
VMware report - would not run and threw this error -
PS E:\Software\Powershell> & '.\VMware backup CSV format.ps1'
At E:\Software\Powershell\VMware backup CSV format.ps1:59 char:45
+ Write-Warning "Error processing job $jobName: $_"
+ ~~~~~~~~~
Variable reference is not valid. ':' was not followed by a valid variable name character. Consider using ${} to
delimit the name.
+ CategoryInfo : ParserError: (:) t], ParseException
+ FullyQualifiedErrorId : InvalidVariableReferenceWithDrive
VMware Script:
Import-Module Veeam.Backup.PowerShell -ErrorAction Stop
$results = @()
$cutoffDate = (Get-Date).AddDays(-7)
# Get all backups (primary backup jobs only)
$backups = Get-VBRBackup | Where-Object {
$_.JobType -in @(
"VmBackup", "WindowsAgent", "LinuxAgent",
"PerVmParentBackup", "SqlBackup", "SqlLogBackup", "BackupSync"
)
}
foreach ($backup in $backups) {
$jobName = $backup.JobName
$jobType = $backup.JobType
try {
$restorePoints = Get-VBRRestorePoint -Backup $backup | Where-Object {
$_.CreationTime -ge $cutoffDate
}
# Get latest restore point per object
$latestPoints = $restorePoints | Group-Object Name | ForEach-Object {
$_.Group | Sort-Object CreationTime -Descending | Select-Object -First 1
}
foreach ($rp in $latestPoints) {
if ($rp.IsConsistent) {
$status = "Success"
} elseif ($rp.IsCorrupted) {
$status = "Failed"
} else {
$status = "Warning"
}
$results += rPSCustomObject]@{
JobName = $jobName
BackupType = $jobType
ObjectName = $rp.Name
LatestBackupTime = $rp.CreationTime
Status = $status
}
}
} catch {
continue
}
}
# Export to Desktop CSV
$csvPath = "$env:USERPROFILE\Desktop\Veeam_Backup_Report_Days.csv"
$results | Sort-Object LatestBackupTime -Descending | Export-Csv -Path $csvPath -NoTypeInformation -Encoding UTF8
Agent script:
Import-Module Veeam.Backup.PowerShell -ErrorAction Stop
$results = @()
$cutoffDate = (Get-Date).AddDays(-7)
# List of patterns for agent-type jobs
$jobNamePatterns = @("Agent", "Physical", "Laptop", "Workstation")
# Get all backups from disk that match agent-related job names
$backups = Get-VBRBackup | Where-Object {
$match = $false
foreach ($pattern in $jobNamePatterns) {
if ($_.JobName -like "*$pattern*") { $match = $true; break }
}
return $match
}
foreach ($backup in $backups) {
$jobName = $backup.JobName
$jobType = $backup.JobType
try {
# Get restore points from disk within last 7 days
$restorePoints = Get-VBRRestorePoint -Backup $backup | Where-Object {
$_.CreationTime -ge $cutoffDate
}
# Get latest restore point per object (agent machine)
$latestPoints = $restorePoints | Group-Object Name | ForEach-Object {
$_.Group | Sort-Object CreationTime -Descending | Select-Object -First 1
}
foreach ($rp in $latestPoints) {
if ($rp.IsConsistent) {
$status = "Success"
} elseif ($rp.IsCorrupted) {
$status = "Failed"
} else {
$status = "Warning"
}
$results += ePSCustomObject]@{
JobName = $jobName
BackupType = $jobType
ObjectName = $rp.Name
LatestBackupTime = $rp.CreationTime
Status = $status
}
}
} catch {
continue
}
}
# Export to CSV on Desktop
$csvPath = "$env:USERPROFILE\Desktop\Agent_Backup_Report.csv"
$results | Sort-Object LatestBackupTime -Descending | Export-Csv -Path $csvPath -NoTypeInformation -Encoding UTF8
Write-Host "`n
Agent backup report (filtered by job name) generated!"
Write-Host "
Saved to: $csvPath`n"
@Chris.Childerhose ...Try this please let me know if any issue
@Chris.Childerhose ...Try this please let me know if any issue
it is working fine ...also run script in enterprise level
@Chris.Childerhose ...Try this please let me know if any issue
it is working fine ...also run script in enterprise level
I will. I am running in my homelab but I have VBR Ent+ license from our Partner licensing. Let me see and update you again.
@surenthiran - that fixed the VMware script. Thanks and it looks good. 
For the Agent script - does that need to be run on a system with the Veeam Agent installed or does it look in VBR? If the Agent is not managed by VBR will it report back?
Agent script not working on my VBR server or on my laptop with the Agent installed.
For the Agent script - does that need to be run on a system with the Veeam Agent installed or does it look in VBR? If the Agent is not managed by VBR will it report back?
Please run it on VBR server ...script runs to fetch from disk
For the Agent script - does that need to be run on a system with the Veeam Agent installed or does it look in VBR? If the Agent is not managed by VBR will it report back?
Please run it on VBR server ...script runs to fetch from disk
Ok will try again but it is not collecting data. VMware one works fine.
For the Agent script - does that need to be run on a system with the Veeam Agent installed or does it look in VBR? If the Agent is not managed by VBR will it report back?
Please run it on VBR server ...script runs to fetch from disk
@surenthiran
Ran the Agent script on VBR again and nothing gets to the file. It is empty.
@Chris.Childerhose If you are getting any error just paste it over here….
@Chris.Childerhose If you are getting any error just paste it over here….
@surenthiran - no errors are received - just the report is blank with no data.
$backups = Get-VBRBackup
… @Chris.Childerhose run this and share me the output please
$backups = Get-VBRBackup
… @Chris.Childerhose run this and share me the output please
Here you go
PS C:\Users\administrator.HOME> $backups = Get-VBRBackup
PS C:\Users\administrator.HOME> $backups
Job Name Type Creation Time VM count
-------- ---- ------------- --------
Direct to Object - Std... VMware Backup 2023-04-26 10:22:... 1
Direct to Object - Syn... VMware Backup 2024-10-16 11:59:... 1
Infrastructure VMs - O... VMware Backup 2025-07-29 5:00:3... 6
Job TON-I455-CC Windows Agen... 2025-06-11 11:19:... 1
Postgres DB Backup - H... VMware Backup 2025-08-11 12:04:... 1
Direct to Object - iDr... VMware Backup 2025-02-14 10:23:... 5
Postgres DB Backup - H... VMware Backup 2025-08-11 9:25:3... 1
Direct to Object - SOB... VMware Backup 2023-05-18 1:16:2... 1
Infrastructure VMs - O... Backup Copy 2025-07-29 9:07:1... 6
Infrastructure VMs - V... VMware Backup 2024-12-04 5:00:1... 7
Direct to Object - iDr... Backup Copy 2025-02-14 10:48:... 5
Infrastructure Linux V... VMware Backup 2024-12-04 10:17:... 6
Postgres DB Backup - H... VMware Backup 2025-08-11 4:22:5... 2
GFS Backup Copy to Imm... Backup Copy 2025-01-13 9:16:0... 22
Postgres DB Backup - H... VMware Postg... 2025-08-11 12:11:... 0
Postgres DB Backup - H... VMware Postg... 2025-08-13 2:02:4... 0
Hi @Chris.Childerhose
Please replace the job filter with below.
$backups = Get-VBRBackup | Where-Object {
$_.JobType -in @("WindowsAgent", "LinuxAgent")
}
...Just update the job filter according to your backup configuration it should work if you are not getting any error