Get RPO per server

PowerShell script exchange

Get RPO per server

Veeam Logoby rboonstra » Tue Dec 20, 2016 1:59 pm

We need to report about the active RPO per server, unfortunatley we don't have Veeam One so Powershell to the rescue. The thing is we use tags to create dynamic jobs, that made it a bit more difficult. I have borowed some parts from other scripts shared here on the forum to create this script

Code: Select all
$VMJobs = Get-VBRBackup | Where-Object {$_.JobType -eq "Backup"}
foreach ($VMjob in $VMjobs.Name)
{ $TagPath = (Find-VBRViEntity -Tags -name $VMjob).Path
$VMs = Find-VBRViEntity -Tags | where {$_.Type -eq "VM" -and $_.path -like "$TagPath*"}
foreach ($VM in $VMs.Name)
{$V =  Get-VBRBackup -Name $VMjob | Get-VBRRestorePoint -Name $VM | measure
$RPO = $V.Count
Write-Output "$VMjob $VM $RPO"}}

My only problem with this solution is that it is too slow. We're protecting 2000+ VM's with Veeam.
Is there a more easy way?
Service Provider
Posts: 6
Liked: 1 time
Joined: Fri Jun 24, 2016 4:02 pm
Location: Netherlands
Full Name: Robert Boonstra

Re: Get RPO per server

Veeam Logoby v.Eremin » Tue Dec 20, 2016 2:20 pm

Find-VBRViEntity is notoriously known for its poor performance. What makes it even worse is the usage of it inside a cycle.

Try to leverage hash table approach, so that your infrastructure gets queried only once.

Veeam Software
Posts: 14360
Liked: 1075 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Return to PowerShell

Who is online

Users browsing this forum: No registered users and 1 guest