PowerShell script exchange
Post Reply
peteraerts
Novice
Posts: 5
Liked: never
Joined: Mar 17, 2015 10:15 am
Full Name: Peter Aerts
Contact:

Script for listing source of replication jobs

Post by peteraerts »

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.
veremin
Product Manager
Posts: 20270
Liked: 2252 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Script for listing source of replication jobs

Post by veremin »

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.
peteraerts
Novice
Posts: 5
Liked: never
Joined: Mar 17, 2015 10:15 am
Full Name: Peter Aerts
Contact:

Re: Script for listing source of replication jobs

Post by peteraerts »

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!
veremin
Product Manager
Posts: 20270
Liked: 2252 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Script for listing source of replication jobs

Post by veremin »

You're welcome. Glad to hear that my input was helpful.
Post Reply

Who is online

Users browsing this forum: No registered users and 18 guests