If there is only a single network adapter and multiple portgroups specified, the command will error out. If there are multiple network adapters and only one portgroup specified, the network adapters will all be assigned to the same portgroup. One key thing to note is that the first item in each array will be referenced together, then the second items will be referenced together, and so on and so forth. This means that you can pass multiple objects to those parameters. However, both the NetworkAdapter and PortGroup parameters accept arrays.
#Export vm esxi 6.5 to hyperv code#
If you look at the example code above, specifically at the network pieces, you’ll notice that it only focuses on moving a VM with a single NIC. $ destinationDatastore = Get- DatastoreCluster – Name DSCluster01 – Server $ destVCConn | Get- Datastore | Sort- Object - Property FreeSpaceGB - Descending | Select- Object - First 1 Here’s some example code on how that can be accomplished: