VMware Cloud Community
Mallik7
Enthusiast
Enthusiast

I've requirement to get the current Guest VM name with ESX host serial number where the guest VM currently residing on with the help of PowerCLI command - can some help here?

Requirement:

ABC is the guest VM name and it is residing on 123 ESX host. I need the guest VM name with the ESX Host serial number where it is residing currently by using PowerCLI command / script. Our environment is ESXi 6.0. Can some one help please. Thanks in advance.

0 Kudos
1 Reply
MBreidenbach0
Hot Shot
Hot Shot

What do you mean by 'ESX host serial number' ? ESXi License key ? ESXi hardware serial number (i.e. the hardware manufacturers serial number) ?

BTW you may want to ask this over in the PowerCLI forum.

Get ESXi host of a VM:

$ESXi = (get-vm vm).VMHost

Get license key of ESXi host:

$ESXi | Select-Object -Property Name,LicenseKey

The serial number of my ProLiant here can be found here:

$ESXi.ExtensionData.Hardware.SystemInfo.OtherIdentifyingInfo[3]

But I was told that this method to get the serial number is not reliable since different manufacturers may provide different info there.

0 Kudos