Setting NIC Guid using Add-VMNIC

Jun 17, 2009 at 12:46 PM

I am trying to script the creation of a new Hyper-V VM & attaching it to an existing .vhd file.

I am using Double-take software to replicate the Hyper-V VM to a remote site via a stretch VLAN & I am able to script the creation of the VM & connection to the replicated .vhd file.    All good.

However when I use the Add-VMNIC command to add a NIC to the new VM, a unique GUID is always used.   I need to be able to specify the same GUID as was used on the original VM, in order to bring up the identical network configuration.

The Add-VMNIC command is supposed to support a GUID switch.  Does anybody know how to use this switch?

Many thanks in advance..

Jul 24, 2009 at 7:35 PM

The syntax for add-vmnic includes -guid just put -guid  {your guid} and you're in business. It creates a new guid if none is specified.