Hi all,
Can some one guide me, i used "LucD" script to extract HBA and Nic details by using following script.
It works great but the problem is, the out put file doesn't contain HBA firmware version.
Can someone help me to get HBA firmware include following output.
Regards,
Nizamuddin Shaikh
$report = Get-Datacenter | % {
$datacenter=$_
foreach($esx in Get-VMhost -Location $datacenter){
$esxcli = Get-EsxCli -VMHost $esx
$nic = Get-VMHostNetworkAdapter -VMHost $esx | Select -First 1 | select -ExpandProperty Name
$hba =Get-VMHostHBA -VMHost $esx -Type FibreChannel | where {$_.Status -eq "online"} | Select -First 1 |select -ExpandProperty Name
Get-VMHostHBA -VMHost $esx -Type FibreChannel | where {$_.Status -eq "online"} |
Select @{N="Datacenter";E={$datacenter.Name}},
@{N="VMHost";E={$esx.Name}},
@{N="HostName";E={$($_.VMHost | Get-VMHostNetwork).HostName}},
@{N="version";E={$esx.version}},
@{N="Manufacturer";E={$esx.Manufacturer}},
@{N="Hostmodel";E={$esx.Model}},
@{Name="SerialNumber";Expression={$esx.ExtensionData.Hardware.SystemInfo.OtherIdentifyingInfo |Where-Object {$_.IdentifierType.Key -eq "Servicetag"} |Select-Object -ExpandProperty IdentifierValue}},
@{N="Cluster";E={
if($esx.ExtensionData.Parent.Type -ne "ClusterComputeResource"){"Stand alone host"}
else{
Get-view -Id $esx.ExtensionData.Parent | Select -ExpandProperty Name
}}},
Device,Model,Status,
@{N="WWPN";E={((("{0:X}"-f $_.NodeWorldWideName).ToLower()) -replace "(\w{2})",'$1:').TrimEnd(':')}},
@{N="WWN";E={((("{0:X}"-f $_.PortWorldWideName).ToLower()) -replace "(\w{2})",'$1:').TrimEnd(':')}},
# @{N="Fnicvendor";E={$esxcli.software.vib.list() | ? {$_.Name -match ".*$($hba.hbadriver).*"} | Select -First 1 -Expand Vendor}},
@{N="Fnicvendor";E={$esxcli.hardware.pci.list() | where {$hba -contains $_.VMKernelName} |Select -ExpandProperty VendorName }},
@{N="fnicdriver";E={$esxcli.system.module.get("fnic").version}},
@{N="Adapter-Firmware"; E={$_.DriverInfo.FirmwareVersion}},
@{N="enicdriver";E={$esxcli.system.module.get("enic").version}},
# @{N="Enicvendor";E={$esxcli.software.vib.list() | ? {$_.Name -match ".net.*"} | Select -First 1 -Expand Vendor}}
@{N="Enicvendor";E={$esxcli.hardware.pci.list() | where {$nic -contains $_.VMKernelName} |Select -ExpandProperty VendorName }}
#@{N="Enicvendor";E={$esxcli.network.nic.list() | where {$vmnic.name -eq $_.vmnic1} | select -First 1 -ExpandProperty Description }}
}
}
$report | Export-Csv report.csv -NoTypeInformation -UseCulture
Try the Get-ESXIODevice script from
they state it gets
Document information from HBAs, NICs and other PCIe devices including PCI IDs, MACs, firmware & drivers
I run these scripts weekly to keep a backup of everything these scripts look at. Looking at mine I see the hba fireware versions, plust the Vib name and versions.
Device Name | Vendor Name | Device Class | PCI Address | VID | DID | SVID | SSID | Driver | Driver Version | Firmware Version | VIB Name | VIB Version | |
MegaRAID SAS Fusion Controller | LSI / Symbios Logic | RAID bus controller | 000:082:00.0 | 1000 | 005b | 1000 | 9271 | megaraid_sas | Version 6.602.54.00.1vmw, Build: 1198610, Interface: 9.2 Built on: Nov 20 2013 | scsi-megaraid-sas | 6.602.54.00-1OEM.550.0.0.1198610 |
The HBA firmware version is an elusive property I'm afraid.
The only way I know how get it is by running the '/usr/lib/vmware/vmkmgmt_keyval/vmkmgmt_keyval -l -i' command in a SSH session.
See the start entry in Get HBA firmware and driver version for all ESXi hosts
You can extract theHBA Firmware version from the output with a Select-String cmdlet and a RegEx expression.
Can you use a SSH session to the ESXi node?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
That's not an HBA but a Controller as far as I can tell?
The repo you point to doesn't do HBA firmware versions either
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Yeah I just noticed that, sorry the excel sheets overflowed to the other column in a way it looked somewhat correct. I still love who ever created this, it grabs alot of information
True, great script!
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
You can also grab both using the tools stated here. I believe esxcli can display NIC firmware and driver version as well now in 6.5 and 6.7.
For NICs that works, not so for HBA I'm afraid.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Hi sjesse,
Not found the link to download the script. seems it is not appropriate link. the share link is redircting to :GitHub - arielsanchezmora/vDocumentation: vDocumentation provides a community-created set of PowerCL... " can you confirm the link once again.