PowerShell script exchange
Post Reply
CoilDomain
Lurker
Posts: 2
Liked: never
Joined: Aug 02, 2012 9:06 pm
Full Name: Jason Ruiz
Contact:

Edit network mapping for HV Replica

Post by CoilDomain » Nov 18, 2014 3:14 pm

It doesn't appear that there are any arguments for this via the normal CMDlet, so I tried the below(with/without [0], but the object is null and I can't change the elements.

Code: Select all

$Job=Get-VBRJob -Name "Replica"
$Options=$Job.GetOptions()
$Job.SetOptions($Options)
$Options.HvNetworkMappingOptions.NetworkMapping[0].IsTrgSwitchSpecified
$Options.HvNetworkMappingOptions.NetworkMapping[0].SrcSwitch = "Hyper-V Pub"
$Options.HvNetworkMappingOptions.NetworkMapping[0].TrgSwitch = "LAN Logical Switch"
$Job.SetOptions($Options)

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests