Hi, again
Anyone got an idea on how to use VI Toolkit to query the Network Adapter Type - Current adapter:
Essentially I'm wanting to know if a vm has vmxnet, vlance or Flexible network adapter
- for Windows servers that are powered on, I could query the os using WMI... but I'd prefer a query against the ESX host
Thanks
Craig
According to the SDK there are 3 NIC types possible.
That is VirtualE1000, VirtualPCNet32 or VirtualVmxnet.
The exact type, afaik, can only be determined by the type of object.
The following script lists all device-types that are connected to a guest.
Based on the returned names you can determine what kind of NIC is defined.
foreach($dev in (Get-View (Get-VM -Name <guest-name>).ID).Config.Hardware.Device){ $dev.GetType() }
With an "if" or a "switch" you should be able to extract the information you want.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
According to the SDK there are 3 NIC types possible.
That is VirtualE1000, VirtualPCNet32 or VirtualVmxnet.
The exact type, afaik, can only be determined by the type of object.
The following script lists all device-types that are connected to a guest.
Based on the returned names you can determine what kind of NIC is defined.
foreach($dev in (Get-View (Get-VM -Name <guest-name>).ID).Config.Hardware.Device){ $dev.GetType() }
With an "if" or a "switch" you should be able to extract the information you want.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
awesome - that's good enough for me.
Thanks