Reply to Message

View discussion in a popup

Replying to:
habs3
Enthusiast
Enthusiast

Here is one to get the NIC Driver and information and may be altered to get HBA info. Give it a try.

$Clstr = Read-host "Enter Cluster Name to get NIC Info from Hosts?"

$Hsts = (get-cluster $Clstr | get-vmhost).Name

Write-output " Host Name,NIC Driver,NIC Version,NIC Firmware Version" | out-file c:\temp\$Clstr.txt

foreach ($Hst in $Hsts)

{

    $ECli = Get-esxcli -Vmhost $Hst

    $Nics = $Ecli.network.nic.list()

    $Nics

    foreach ($Nic in $Nics)

        {

        $NicInfo = $Ecli.network.nic.get($Nic.Name).driverinfo

        $Hst + "," + $NicInfo.Driver + "," + $NicInfo.Version + "," + $NicInfo.FirmWareVersion | out-file c:\temp\$Clstr.txt -append       

        }

}