PowerShell script exchange
Post Reply
drkuhlman
Lurker
Posts: 2
Liked: never
Joined: Nov 09, 2015 2:37 pm
Full Name: Don K
Contact:

How to list all replication jobs and re-ip settings

Post by drkuhlman »

Hi folks. We're getting ready for DR testing and I need to do a review of all replication jobs. I need to verify their Re-IP settings for subnet mask, gateway, and IP address. Is there a report that will list all of this information, or has someone put together a Powershell script to create it?

I did search the Forums, and saw a couple items that listed some data, but didn't find anything that would specifically list the replication settings and the details we need.

Thanks,

Don K
veremin
Product Manager
Posts: 20400
Liked: 2298 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: How to list all replication jobs and re-ip settings

Post by veremin »

Is the following script something you're looking for:

Code: Select all

foreach ($Job in (Get-VBRJob | where {$_.JobType -eq "Replica"}))
    {
        $Job.Name
        Get-VBRViReplicaReIpRule -Job $Job
    }
Replace Get-VBRViReplicaReIpRule with Get-VBRHvReplicaReIpRule, if you're running Hyper-V.

Thanks.
drkuhlman
Lurker
Posts: 2
Liked: never
Joined: Nov 09, 2015 2:37 pm
Full Name: Don K
Contact:

Re: How to list all replication jobs and re-ip settings

Post by drkuhlman »

Yes! That's what I was hoping to do. Thanks very much for the quick reply and help!
Don K
veremin
Product Manager
Posts: 20400
Liked: 2298 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: How to list all replication jobs and re-ip settings

Post by veremin »

You're welcome. Feel free to ask for additional help, if required. Thanks.
Shaft
Influencer
Posts: 17
Liked: never
Joined: Nov 05, 2013 3:06 pm
Full Name: Vince Rucolas
Contact:

Re: How to list all replication jobs and re-ip settings

Post by Shaft »

This is an old post and I hope someone sees it. I like this script but would like to export to csv/excel and put the results in one row.

something like this
column1 | column2 | column3 |column4 | column5 | column6 |clm7 | clm8 | column9
ROW1 > Job-name | Source IP | Source Mask | TargetIP | TargetMask | TargetGateway | DNS | WINS | Description
ROW2 > Job-name | Source IP | Source Mask | TargetIP | TargetMask | TargetGateway | DNS | WINS | Description
ROW3 > Job-name | Source IP | Source Mask | TargetIP | TargetMask | TargetGateway | DNS | WINS | Description

Thanks for any help with this
david.domask
Veeam Software
Posts: 2123
Liked: 513 times
Joined: Jun 28, 2016 12:12 pm
Contact:

Re: How to list all replication jobs and re-ip settings

Post by david.domask »

Hi @Shaft,

Try saving the output to some variable and then pipe that variable to Export-CSV with the -NoTypeInformation parameter set. You might want to make a PSCustomObject with the relevant properties you desire to see in the loop, and then add the PSCustomObject to an array, and then pass the array to Export-CSV.
David Domask | Product Management: Principal Analyst
Shaft
Influencer
Posts: 17
Liked: never
Joined: Nov 05, 2013 3:06 pm
Full Name: Vince Rucolas
Contact:

Re: How to list all replication jobs and re-ip settings

Post by Shaft »

Thanks for the help David, I have limited scripting knowledge but am working on these two suggestions. I will let you know what I came up with as well as any questions. This is secondary and I have other more pressing things to look at so it maybe a bit before I get back to you.

Thanks,
Post Reply

Who is online

Users browsing this forum: hlandeb and 14 guests