Automation

 View Only
  • 1.  Get Host Serial Number from VC

    Posted Aug 09, 2019 09:16 AM

    Hi All,

    I've an issue at the moment where, when you select a Host within the VC, go to Configure/Hardware/Processors the Service Tag / Serial Number field displays "To be filled by O.E.M."

    I need to capture Serial Number / Service Tag information for Asset Management.

    I can get the Serial Number by connecting directly to a Host and issuing

    Get-VMHost HostName.MyDomain.com | Select-Object Name,Manufacturer, Model, @{N="Serial Number";E={(Get-EsxCli -VMHost $_.Name).hardware.platform.get().SerialNumber}}, PowerState | Format-Table -AutoSize

    With Thousands of Hosts though, i'd prefer to get this from a single login to the VC.

    From a connection to the VC, I've searched all the Get-VMhost properties and can't find the Serial Number / Service Tag.

    I've also piped get-VMhost into get-view, there are more properties available here but for me it's like searching for a needle in a haystack.

    Any help would be appreciated

    Thanks



  • 2.  RE: Get Host Serial Number from VC
    Best Answer

    Posted Aug 09, 2019 09:57 AM

    You can use exactly the same code while connected to a VC.

    ---------------------------------------------------------------------------------------------------------

    Was it helpful? Let us know by completing this short survey here.



  • 3.  RE: Get Host Serial Number from VC

    Posted Aug 09, 2019 10:08 AM

    Thanks Luc, can't believe i didn't try that :smileyblush: :smileyconfused:

    I'm off to get a coffee