Automation

 View Only
Expand all | Collapse all

Host Hardware information

  • 1.  Host Hardware information

    Posted Aug 26, 2010 03:14 PM

    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



  • 2.  RE: Host Hardware information

    Posted Aug 26, 2010 03:37 PM

    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



  • 3.  RE: Host Hardware information

    Posted Aug 26, 2010 06:29 PM

    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



  • 4.  RE: Host Hardware information

    Posted Aug 26, 2010 06:33 PM

    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



  • 5.  RE: Host Hardware information

    Posted Aug 26, 2010 07:00 PM

    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



  • 6.  RE: Host Hardware information

    Posted Aug 26, 2010 07:04 PM

    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



  • 7.  RE: Host Hardware information

    Posted Aug 26, 2010 07:07 PM

    I just checke di have PS2 installed.

    Major Minor Build Revision

    -


    -


    -


    -


    2 0 -1 -1



  • 8.  RE: Host Hardware information

    Posted Jun 01, 2018 05:37 PM

    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?



  • 9.  RE: Host Hardware information

    Posted Jun 01, 2018 06:14 PM

    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.



  • 10.  RE: Host Hardware information

    Posted Jun 01, 2018 07:42 PM

    Look at this

    GitHub - arielsanchezmora/vDocumentation: vDocumentation provides a community-created set of PowerCLI scripts that produ…

    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 DescriptionVMKernel NameDevice NameVendor NameDevice ClassPCI AddressVIDDIDSVIDSSIDDriverDriver VersionFirmware VersionVIB NameVIB Version
    Chassis slot 4.00vmhba0MegaRAID SAS Fusion ControllerLSI / Symbios LogicRAID bus controller000:082:00.01000005b10009271megaraid_sasVersion 6.602.54.00.1vmw, Build: 1198610, Interface: 9.2 Built on: Nov 20 2013scsi-megaraid-sas6.602.54.00-1OEM.550.0.0.1198610
    vmnic0I350 Gigabit Network ConnectionIntel CorporationEthernet controller000:002:00.0808615211137008bigbVersion 5.0.5.1, Build: 2403361, Interface: 9.2 Built on: Jan  1 20151.63, 0x80000aa5, 0.324.97net-igb5.0.5.1.1-1vmw.550.2.54.2403361
    vmnic1I350 Gigabit Network ConnectionIntel CorporationEthernet controller000:002:00.1808615211137008bigbVersion 5.0.5.1, Build: 2403361, Interface: 9.2 Built on: Jan  1 20151.63, 0x80000aa5, 0.324.97net-igb5.0.5.1.1-1vmw.550.2.54.2403361
    vmnic2I350 Gigabit Network ConnectionIntel CorporationEthernet controller000:002:00.2808615211137008bigbVersion 5.0.5.1, Build: 2403361, Interface: 9.2 Built on: Jan  1 20151.63, 0x80000aa5, 0.324.97net-igb5.0.5.1.1-1vmw.550.2.54.2403361
    vmnic3I350 Gigabit Network ConnectionIntel CorporationEthernet controller000:002:00.3808615211137008bigbVersion 5.0.5.1, Build: 2403361, Interface: 9.2 Built on: Jan  1 20151.63, 0x80000aa5, 0.324.97net-igb5.0.5.1.1-1vmw.550.2.54.2403361


  • 11.  RE: Host Hardware information

    Posted Jun 01, 2018 07:44 PM

    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