Hi, is there a script which will tell me about the host hardware. I dont want a detailed report like esxcfg-info command output. But something like nic card build number, processor, FC Card and their PCI slot details.
I have a mix environment of vSpehre and ESX 3.5
Thanks
For the PCI slots and the cards you can use the script from my Name that hardware post.
For properties like NIC card build you will have to explore the HostSystem object and more specifically the PhysicalNic object.
____________
Blog: LucD notes
Twitter: lucd22
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
I am sorry but I am not able to download the Name that hardware script from your site.
My knowledge in programming is very very little.
thanks
There is no download button in the post.
If you hover your mouse over the code box 4 icons will appear in the top right corner.
The 2nd icon will copy the code to your clipboard.
____________
Blog: LucD notes
Twitter: lucd22
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Thanks for the info.
When I run the script I am getting following erro message...
PS C:\Documents and Settings\tom\Desktop> .\hwinfo.ps1
New-Object : A parameter cannot be found that matches parameter name 'Property'.
At C:\Documents and Settings\tom\Desktop\hwinfo.ps1:32 char:57
+ $deviceTab[$vendorId] = New-Object PSObject -Property <<<< @{
New-Object : A parameter cannot be found that matches parameter name 'Property'.
At C:\Documents and Settings\tom\Desktop\hwinfo.ps1:32 char:57
+ $deviceTab[$vendorId] = New-Object PSObject -Property <<<< @{
You cannot call a method on a null-valued expression.
At C:\Documents and Settings\tom\Desktop\hwinfo.ps1:24 char:51
+ if(!$deviceTab[$vendorId].deviceTab.ContainsKey <<<< ($deviceId)){
New-Object : A parameter cannot be found that matches parameter name 'Property'.
At C:\Documents and Settings\tom\Desktop\hwinfo.ps1:32 char:57
+ $deviceTab[$vendorId] = New-Object PSObject -Property <<<< @{
New-Object : A parameter cannot be found that matches parameter name 'Property'.
At C:\Documents and Settings\tom\Desktop\hwinfo.ps1:32 char:57
+ $deviceTab[$vendorId] = New-Object PSObject -Property <<<< @{
You cannot call a method on a null-valued expression.
At C:\Documents and Settings\tom\Desktop\hwinfo.ps1:24 char:51
+ if(!$deviceTab[$vendorId].deviceTab.ContainsKey <<<< ($deviceId)){
You cannot call a method on a null-valued expression.
At C:\Documents and Settings\tom\Desktop\hwinfo.ps1:18 char:51
+ if(!$deviceTab[$vendorId].deviceTab.ContainsKey <<<< ($subdeviceId)){
You cannot call a method on a null-valued expression.
At C:\Documents and Settings\tom\Desktop\hwinfo.ps1:18 char:51
+ if(!$deviceTab[$vendorId].deviceTab.ContainsKey <<<< ($subdeviceId)){
New-Object : A parameter cannot be found that matches parameter name 'Property'.
At C:\Documents and Settings\tom\Desktop\hwinfo.ps1:32 char:57
+ $deviceTab[$vendorId] = New-Object PSObject -Property <<<< @{
I think I have a older Powershell. Now sure. Any ideas ?
Thanks
Yes, I'm pretty sure you have an older PS.
The script uses the -Property parameter with the New-Object cmdlet, and that is PS v2 only I'm afraid.
Can you upgrade to PS v2 ?
____________
Blog: LucD notes
Twitter: lucd22
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
I just checke di have PS2 installed.
Major Minor Build Revision
-
-
-
-
2 0 -1 -1
I've been poking around the SDK for a while to retrieve the HostSystem object, and it seems to give me exactly the information I'm looking for.
Do you know if there's an alternative way to do this? Preferably one that doesn't involve having to deal with SOAP and Managed Objects?
If you use Get-VMHost to retrieve the ESXi node you want, via the ExtensionData property on the returned object, you have access to the HostSystem object.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Look at this
it gives you an option to run a report on all your devices report that looks like this, I left off the host names, that was the first column.
Slot Description | VMKernel Name | Device Name | Vendor Name | Device Class | PCI Address | VID | DID | SVID | SSID | Driver | Driver Version | Firmware Version | VIB Name | VIB Version | ||
Chassis slot 4.00 | vmhba0 | 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 | |||
vmnic0 | I350 Gigabit Network Connection | Intel Corporation | Ethernet controller | 000:002:00.0 | 8086 | 1521 | 1137 | 008b | igb | Version 5.0.5.1, Build: 2403361, Interface: 9.2 Built on: Jan 1 2015 | 1.63, 0x80000aa5, 0.324.97 | net-igb | 5.0.5.1.1-1vmw.550.2.54.2403361 | |||
vmnic1 | I350 Gigabit Network Connection | Intel Corporation | Ethernet controller | 000:002:00.1 | 8086 | 1521 | 1137 | 008b | igb | Version 5.0.5.1, Build: 2403361, Interface: 9.2 Built on: Jan 1 2015 | 1.63, 0x80000aa5, 0.324.97 | net-igb | 5.0.5.1.1-1vmw.550.2.54.2403361 | |||
vmnic2 | I350 Gigabit Network Connection | Intel Corporation | Ethernet controller | 000:002:00.2 | 8086 | 1521 | 1137 | 008b | igb | Version 5.0.5.1, Build: 2403361, Interface: 9.2 Built on: Jan 1 2015 | 1.63, 0x80000aa5, 0.324.97 | net-igb | 5.0.5.1.1-1vmw.550.2.54.2403361 | |||
vmnic3 | I350 Gigabit Network Connection | Intel Corporation | Ethernet controller | 000:002:00.3 | 8086 | 1521 | 1137 | 008b | igb | Version 5.0.5.1, Build: 2403361, Interface: 9.2 Built on: Jan 1 2015 | 1.63, 0x80000aa5, 0.324.97 | net-igb | 5.0.5.1.1-1vmw.550.2.54.2403361 |
theres more, it looks like it cut off the site. The column headers are
Hostname Slot Description VMKernel Name Device Name Vendor Name Device Class PCI Address VID DID SVID SSID Driver Driver Version Firmware Version VIB Name VIB Version