Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 168455

Re: Need some help in modifying PowerCLI script to get NIC driver & firmware version ?

$
0
0

Hi LucD, many thanks for the assistance.

 

I never thought that this is possible with the same PowerCLI:

 

$strHostsClusterName = "Production"
Get-View -ViewType HostSystem -Property Name, Runtime.HealthSystemRuntime.SystemHealthInfo.NumericSensorInfo -SearchRoot (Get-View -ViewType ClusterComputeResource -Property Name -Filter @{"Name" = "^$([RegEx]::escape($strHostsClusterName))$"}).MoRef | %{    $arrNumericSensorInfo = @($_.Runtime.HealthSystemRuntime.SystemHealthInfo.NumericSensorInfo)    # HostNumericSensorInfo for BIOS, iLO, array controller    $nsiBIOS = $arrNumericSensorInfo | ? {$_.Name -like "*System BIOS*"}    $nsiArrayCtrlr = $arrNumericSensorInfo | ? {$_.Name -like "HP Smart Array Controller*"}    $nsiILO = $arrNumericSensorInfo | ? {$_.Name -like "Hewlett-Packard BMC Firmware*"}    $esxName = $_.Name    $esxcli = Get-EsxCli -VMHost $_.Name    $esxcli.network.nic.list() | %{      $esxcli.network.nic.get($_.Name) | %{          New-Object PSObject -Property @{              VMHost = $esxName              "SystemBIOS" = $nsiBIOS.name              "HPSmartArray" = $nsiArrayCtrlr.Name              "iLOFirmware" = $nsiILO.Name              "nx_nic device" = $_.Name              "nx_nic driver" = $_.DriverInfo.Driver              "nx_nic driver version" = $_.DriverInfo.Version              "nx_nic firmware version" = $_.DriverInfo.FirmwareVersion          } ## end new-object      }    }
} | Export-Csv C:\temp\Production-BLadeG7.csv  ## end Foreach-Object

 

Special tahnks to mattboren for creating such a great script initially now it is modified for completeness


Viewing all articles
Browse latest Browse all 168455

Trending Articles