I'm looking for a way to get the DVSwitch dvUplink and VMnic assignment. I can get this information from going to the switch below.
This gets me to the pnic...
// VcHostNetworkSystem
var networkSystem = host.configManager.networkSystem;
var networkInfo = networkSystem.networkInfo;
var pnic = networkInfo.pnic;
for (var i in pnic){
System.log("pnic.device: " + pnic[i].device);
System.log("pnic.key: " + pnic[i].key);
System.log("pnic.mac: " + pnic[i].mac);
System.log("pnic.spec: " + pnic[i].spec);
System.log("--");
}