Hi, Im working on powershell automation for guest deployment.
I am creating new VMs in Hyperv and assigning 2 interfaces, one external and one internal. The external one allows the guest to use DHCP.
What I would like to know, if for instance I didnt have DHCP available, how could I find which guest NIC is connected to which vmswitch? The external switch is connected at vm creation and in the guest is called Ethernet 5, but when I create the second connection it gets called Ethernet 4. These names are arbitrary and I would like to know of there is a definitive way to gather such details?
Thanks a lot.