Script to show last successful Veeam backup of VMs

Script to show last successful Veeam backup of VMs

Here is a small and simple PowerShell script to list VMs, their last successful backup and the days gone since then.

Add-PSSnapin VeeamPSSnapin
Connect-VBRServer -Server Backup_Server
$today = Get-Date
$vbrrestore = get-vbrbackup | Get-VBRRestorePoint | sort vmname,CreationTime | select vmname, creationtime , @{n='Days since last success'; e={(New-TimeSpan -Start $_.creationtime -End $today).days}} | group vmname
$vbrrestore | foreach {$ | select -last 1} | ft -AutoSize

7 responses to “Script to show last successful Veeam backup of VMs”

  1. Thomas B says:

    Please could you help me. Do you know how to filter this to get only Veeam Agent backup jobs for Windows computers? Thanks

    • woifgaung says:

      I didn’t need this up to now. But you can filter by Job-Name in cmdlet get-vbrbackup, or you can probably use Get-VBREPJob instead, that should be for agent-backup only.

  2. Thomas B says:

    One more question please : How to exclude computer/vm included in disabled jobs? Thanks for your help

  3. Thomas B says:

    Ah ok, I didn’t have answer so I was afraid that something appened to you 😉

    Thanks for your answers

Leave a Reply

Your email address will not be published. Required fields are marked *