Reply to Message

View discussion in a popup

Replying to:
LucD
Leadership
Leadership

You can get the vendors of the ESX NIC cards in a similar way.

&{foreach($esx in Get-VMHost){

    $esxcli = Get-EsxCli -VMHost $esx

    $vnicNames = Get-VMHostNetworkAdapter -VMHost $esx | Select -ExpandProperty DeviceName

    $esxcli.hardware.pci.list() |where {$vnicNames -contains $_.VMKernelName} |

        Select @{N="ESX";E={$esx.Name}},VMKernelName,DeviceName,VendorName,SubVendorID,SubDeviceID

}}

But in you script you looping through all the HBAm how do you plan on including all the NICs that are the ESXi host ?

Perhaps it will be easier if you first draw out what information (which properties) you want in your report.


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

Reply
0 Kudos