Script for listing source of replication jobs

PowerShell script exchange

Script for listing source of replication jobs

Veeam Logoby peteraerts » Tue Mar 17, 2015 11:56 am

I would like to get a list of all my replication jobs and whether they replicate from the VM or from an existing backup (so the stuff behind the Source button in the VM list of the replicatio job properties).
But I just can't seem to find the right property or command to do so.
Anyone can give me a hint? We're using VBR v8.
peteraerts
Novice
 
Posts: 5
Liked: never
Joined: Tue Mar 17, 2015 10:15 am
Full Name: Peter Aerts

Re: Script for listing source of replication jobs

Veeam Logoby v.Eremin » Tue Mar 17, 2015 12:06 pm

Hi, Peter,

Try the following script:
Code: Select all
Get-VBRJob | where {$_.Jobtype -eq "Replica"} | Select-Object -property @{N="Name";E={$_.Name}}, @{N="Replicate from Backups";E={$_.options.replicasourceoptions.backup2vi}}


Thanks.
v.Eremin
Veeam Software
 
Posts: 13296
Liked: 973 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: Script for listing source of replication jobs

Veeam Logoby peteraerts » Tue Mar 17, 2015 12:18 pm

Yep that was exactly what I was looking for!
I got close, but somehow never noticed ReplicaSourceOptions , or realized that Backup2Vi was the property I needed.

Thanks!
peteraerts
Novice
 
Posts: 5
Liked: never
Joined: Tue Mar 17, 2015 10:15 am
Full Name: Peter Aerts

Re: Script for listing source of replication jobs

Veeam Logoby v.Eremin » Tue Mar 17, 2015 12:20 pm

You're welcome. Glad to hear that my input was helpful.
v.Eremin
Veeam Software
 
Posts: 13296
Liked: 973 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 10 guests