Hi
is it possible to get host hardware info like below using powercli..
Ip,Hostname,
Hardware,
Bios version,
model,
cpu Family,
biosversion,
Fc card model and version
It is because your esxihost are connected to vcenter by IP addresses not the name.
This will do the trick.
Get-VMHost | Select-object @{N="HostName";E={ $_ | Get-VMHostNetwork | select -ExpandProperty Hostname}},
@{N="IPAddress"; E={($_ | Get-VMHostNetwork).VirtualNic | Where-Object {$_.ManagementTrafficEnabled} | Select-Object -ExpandProperty IP}},
Manufacturer,
Model,
ProcessorType,
@{N="BIOS version";E={$_.ExtensionData.Hardware.BiosInfo.BiosVersion}},
@{N="HBA Model";E={($_ | get-vmhosthba -Type FibreChannel | select-object -ExpandProperty Model) -join ", "}},
@{N="Driver";E={($_ | get-vmhosthba -Type FibreChannel | select-object -ExpandProperty Driver) -join ", "}}
Message was edited by: Kunal Udapi
For Ip,Hostname, Hardware, Bios version, model, cpu Family, biosversion
Get-VMHost | Select-object Name,`
@{N="IPAddress"; E={($_ | Get-VMHostNetwork).VirtualNic | Where-Object {$_.ManagementTrafficEnabled}}},`
Manufacturer, Model, ProcessorType, @{N="BIOS version";E={$_.ExtensionData.Hardware.BiosInfo.BiosVersion}}`
@{N="HBA";E={$_.ExtensionData.Hardware.BiosInfo.BiosVersion}}
for FC card details try below command.
Get-VMHosthba
so can you please help me out to insert Get-vmhosthba to the above script to get Fc card model and version at once..
Script was ready but i had to try it on the real HBA card, I tested it now.
Get-VMHost | Select-object Name, @{N="IPAddress"; E={($_ | Get-VMHostNetwork).VirtualNic | Where-Object {$_.ManagementTrafficEnabled}}}, Manufacturer, Model, ProcessorType, @{N="BIOS version";E={$_.ExtensionData.Hardware.BiosInfo.BiosVersion}}, @{N="HBA Model";E={($_ | get-vmhosthba -Type FibreChannel | select-object -ExpandProperty Model) -join ", "}}, @{N="Driver";E={($_ | get-vmhosthba -Type FibreChannel | select-object -ExpandProperty Driver) -join ", "}}
I have taken FC Driver as a FC version, I will check further and get back.
Hi kunaludapi
Sorry for delay i tested the below script host name and ip adress are not showing properly.Check the below out put
can you please correct it...and also can i generate over datacenter by adding get-datacenter |get-cluster |get-vmhost
Message was edited by: vin01
Get-Datacenter -name <DatacenterName> | Get-Cluster -Name <ClusterName> | Get-VMHost | Select-object Name,
@{N="IPAddress"; E={($_ | Get-VMHostNetwork).VirtualNic | Where-Object {$_.ManagementTrafficEnabled} | Select-Object -ExpandProperty IP}},
Manufacturer,
Model,
ProcessorType,
@{N="BIOS version";E={$_.ExtensionData.Hardware.BiosInfo.BiosVersion}},
@{N="HBA Model";E={($_ | get-vmhosthba -Type FibreChannel | select-object -ExpandProperty Model) -join ", "}},
@{N="Driver";E={($_ | get-vmhosthba -Type FibreChannel | select-object -ExpandProperty Driver) -join ", "}}
I have added datacenter and cluster at the start of the script you will need to provide names.
at output in place of
Name :
it is showing ip address only not host name any change to put hostname.
It is because your esxihost are connected to vcenter by IP addresses not the name.
This will do the trick.
Get-VMHost | Select-object @{N="HostName";E={ $_ | Get-VMHostNetwork | select -ExpandProperty Hostname}},
@{N="IPAddress"; E={($_ | Get-VMHostNetwork).VirtualNic | Where-Object {$_.ManagementTrafficEnabled} | Select-Object -ExpandProperty IP}},
Manufacturer,
Model,
ProcessorType,
@{N="BIOS version";E={$_.ExtensionData.Hardware.BiosInfo.BiosVersion}},
@{N="HBA Model";E={($_ | get-vmhosthba -Type FibreChannel | select-object -ExpandProperty Model) -join ", "}},
@{N="Driver";E={($_ | get-vmhosthba -Type FibreChannel | select-object -ExpandProperty Driver) -join ", "}}
Message was edited by: Kunal Udapi
Thanks Kunal that's worked..
Kunal in the same script can we get adapter firmware driver version
Yes please,
how can I get the firmware version ?
Which firmware version is required? Is it adapter..
Below my other post it could be helpful.
Host Hardware info with HBA and nic driver information
You are awesome !
thanks for sharing.