I am using a script I found here, and trying to get PowerCLI to output a CSV of all VMs in an instance to ensure when these VMs are manually cloned and presented in another instance (don't ask, long story, bad planning) for a DR test, that we can confirm the NICs come across as they were in the source, MAC and all.
Attached file is the script I am using, but I get the following;
VM, vNIC, IP, Portgroup, VLANId, VLAN, Type, SwitchType
testvwotxa202, Network adapter 1, 16.48.33.148,
Note, nothing for Portgroup, VLANid, VLAN, Type etc.
Any thoughts?
That looks like some of the VMs might not be connected to a portgroup.
Can you run the following for one of those VMs?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
I am seeing details on NetworkName for each interface.
Example ;
MacAddress: <shows MAC address>
NetworkName: <Name of configured distributed port group>
Can you check if the following actually shows those VMs in the output from the following?
And if the port number you see on the switch, corresponds with the port number you see on the VM's vNIC?
Get-VDSwitch -Name MyVDS | Get-VDPort
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference