Powershell script to create replica to another vcenter

PowerShell script exchange

Powershell script to create replica to another vcenter

Veeam Logoby remko oude elferink » Wed Jun 22, 2016 1:20 pm


We have 2 Vcenters in 2 different datacenters, they are in linked mode and our Veeam server is connected to both of them for daily jobs.

Now i am very new into scripting and powershell, i dont know how to start.

My goal is to automate the creation of a replica job from DC1 to DC2 via powershell.

Basic setup is as follows
Name of folder and resourcepool are identical, for example Vcenter1\test
Now i want to replicate it to Vcenter2\test\replica.

Via the GUI you can easily select source and destinations, but i dont know how to do it via powershell.

The second question is, we have over 1000+ portgroups in vCenter, i want to be able to create 10 specific named portgroups to be used as network mapping with source in Vcenter1 and destination in Vcenter2. Names are identical.
Thanks for your help!
remko oude elferink
Posts: 1
Liked: never
Joined: Wed Jun 22, 2016 1:05 pm
Full Name: Remko Oude Elferink

Re: Powershell script to create replica to another vcenter

Veeam Logoby v.Eremin » Thu Jun 23, 2016 9:26 am

There are several steps the procedure will consist of:

1) Finding vSphere entities. Use Find-VBRViEntity for that.
2) Replication Job creation. Use Add-VBRViReplicaJob for that.
3) Collecting Network info (required for network mapping rules creation). Use Get-VBRViServerNetworkInfo for that.

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

Return to PowerShell

Who is online

Users browsing this forum: Bing [Bot] and 1 guest