juststormY
Contributor
Contributor

Get HBA and NIC info

Hello all together,

I'm trying to get the following info of the ESX server, but i think i do wrong:

I want to get the the vendor and model of each HBA and also the NICs of the ESX host. I tried e.g. Config.StorageDevice.HostBusAdapter but no info appears.

Can anybody help me in this case?

Thanks a lot!

0 Kudos
3 Replies
LucD
Leadership
Leadership

From the HostSystem object loop through the Hardware.[PciDevice|http://www.vmware.com/support/developer/vc-sdk/visdk25pubs/ReferenceGuide/vim.host.PciDevice.html] array.

For each PCI device you should see vendor and the model.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
juststormY
Contributor
Contributor

Hello LucD,

thanks a lot. Can you please give me a short example. I think I tried wrong. Thanks!

0 Kudos
LucD
Leadership
Leadership

You can do something like this

$esx = Get-VMHost <ESX-hostname> | Get-View
foreach($pci in $esx.Hardware.PciDevice){
  Write-Host $pci.VendorName $pci.DeviceName $pci.DeviceId
}


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos