PowerShell script exchange
Post Reply
remko oude elferink
Lurker
Posts: 1
Liked: never
Joined: Jun 22, 2016 1:05 pm
Full Name: Remko Oude Elferink
Contact:

Powershell script to create replica to another vcenter

Post by remko oude elferink »

Hi,

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

Re: Powershell script to create replica to another vcenter

Post by veremin »

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.

Thanks.
Post Reply

Who is online

Users browsing this forum: No registered users and 19 guests