- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
so can you please help me out to insert Get-vmhosthba to the above script to get Fc card model and version at once..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
at output in place of
Name :
it is showing ip address only not host name any change to put hostname.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Kunal that's worked..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Kunal in the same script can we get adapter firmware driver version
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes please,
how can I get the firmware version ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You are awesome !
thanks for sharing.