Skip to main content

Veeam client inventory in csv format via powershell


surenthiran
  • Filters backups by job type (VMware, Windows/Linux Agents, SQL, etc.)
  • Retrieves restore points from the last 7 days
  • Identifies the latest restore point per object
  • Flags backup status as SuccessWarning, or Failed
  • Exports results to a CSV file on the desktop

📁 Output:

  • CSV file: Veeam_Backup_Report_Days.csv
  • Columns: JobNameBackupTypeObjectNameLatestBackupTimeStatus

📌 Requirements:

  • Veeam Backup & Replication PowerShell module
  • Valid license and running Veeam services
  • SMTP access for email delivery

🔗 GitHub Repository:

https://github.com/Surenthiran25/Veeam_Client_Inventory_Inventory

27 comments

surenthiran
  • Author
  • Comes here often
  • 15 comments
  • August 11, 2025

Let me know your thoughts


Chris.Childerhose
Forum|alt.badge.img+21
  • Veeam Legend, Veeam Vanguard
  • 9171 comments
  • August 11, 2025

Very interesting and another Powershell script which is always nice for automated tasks.  Will test it out and provide feedback.


surenthiran
  • Author
  • Comes here often
  • 15 comments
  • August 11, 2025
surenthiran wrote:

Let me know your thoughts

 


Chris.Childerhose
Forum|alt.badge.img+21
  • Veeam Legend, Veeam Vanguard
  • 9171 comments
  • August 11, 2025
surenthiran wrote:
surenthiran wrote:

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. 😉


surenthiran
  • Author
  • Comes here often
  • 15 comments
  • August 11, 2025

Sure i will make it🤣


surenthiran
  • Author
  • Comes here often
  • 15 comments
  • August 11, 2025

surenthiran
  • Author
  • Comes here often
  • 15 comments
  • August 11, 2025
surenthiran wrote:

Let me know your thoughts please


surenthiran
  • Author
  • Comes here often
  • 15 comments
  • August 13, 2025

@Veeam Administrator

@Chris.Childerhose ...Did you get time to check my script please😇


waqasali
Forum|alt.badge.img+3
  • Influencer
  • 322 comments
  • August 13, 2025

Great work ​@surenthiran The job type filtering and restore point logic are very practical. 


Chris.Childerhose
Forum|alt.badge.img+21
  • Veeam Legend, Veeam Vanguard
  • 9171 comments
  • August 13, 2025
surenthiran wrote:

@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: (:) [], ParseException
    + FullyQualifiedErrorId : InvalidVariableReferenceWithDrive

 
 
 

surenthiran
  • Author
  • Comes here often
  • 15 comments
  • August 13, 2025

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 += [PSCustomObject]@{
                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
 


surenthiran
  • Author
  • Comes here often
  • 15 comments
  • August 13, 2025

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 += [PSCustomObject]@{
                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"


surenthiran
  • Author
  • Comes here often
  • 15 comments
  • August 13, 2025

@Chris.Childerhose ...Try this please let me know if any issue


surenthiran
  • Author
  • Comes here often
  • 15 comments
  • August 13, 2025
surenthiran wrote:

@Chris.Childerhose ...Try this please let me know if any issue

it is working fine ...also run script in enterprise level 


Chris.Childerhose
Forum|alt.badge.img+21
  • Veeam Legend, Veeam Vanguard
  • 9171 comments
  • August 13, 2025
surenthiran wrote:
surenthiran wrote:

@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.


Chris.Childerhose
Forum|alt.badge.img+21
  • Veeam Legend, Veeam Vanguard
  • 9171 comments
  • August 13, 2025

@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?

 
 
 

Chris.Childerhose
Forum|alt.badge.img+21
  • Veeam Legend, Veeam Vanguard
  • 9171 comments
  • August 13, 2025

Agent script not working on my VBR server or on my laptop with the Agent installed.


surenthiran
  • Author
  • Comes here often
  • 15 comments
  • August 13, 2025

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


Chris.Childerhose
Forum|alt.badge.img+21
  • Veeam Legend, Veeam Vanguard
  • 9171 comments
  • August 13, 2025
surenthiran wrote:

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.


Chris.Childerhose
Forum|alt.badge.img+21
  • Veeam Legend, Veeam Vanguard
  • 9171 comments
  • August 13, 2025
surenthiran wrote:

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.


surenthiran
  • Author
  • Comes here often
  • 15 comments
  • August 15, 2025

 ​@Chris.Childerhose  If you are getting any error just paste it over here….


Chris.Childerhose
Forum|alt.badge.img+21
  • Veeam Legend, Veeam Vanguard
  • 9171 comments
  • August 15, 2025
surenthiran wrote:

 ​@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.


surenthiran
  • Author
  • Comes here often
  • 15 comments
  • August 15, 2025

$backups = Get-VBRBackup
… ​@Chris.Childerhose run this and share me the output please


Chris.Childerhose
Forum|alt.badge.img+21
  • Veeam Legend, Veeam Vanguard
  • 9171 comments
  • August 15, 2025
surenthiran wrote:

$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

 


surenthiran
  • Author
  • Comes here often
  • 15 comments
  • August 16, 2025

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

 


Comment