How can I find the DELL Service Tag for my VMware ESXi host using PowerCLI?

518 Views Asked by At

Need powershell cli command to find DELL Service Tag for Server/Host(NOT SERIAL NUMBER, OR LAPTOP, DESKTOP OR VIRTUAL MACHINE) in VMware 6.7. I can find it in the gui; but in powershell cli it is very illusive. I Would to add this to a script for weekly reporting...

gwmi win32_bios - gives a serial number instead of service tag

get-vmhost -name vmhostesxi01 | fl - none of the properties were successful

1

There are 1 best solutions below

0
dpd696 On

To retrieve the DELL Service Tag for a Dell server/host in VMware 6.7 using PowerShell, you can use the following command:

(Get-WmiObject -Class Win32_BIOS -Namespace "root\CIMv2" -ComputerName "hostname").SerialNumber

Replace "hostname" with the actual hostname or IP address of the server/host you want to query. This command uses the Get-WmiObject cmdlet to query the Win32_BIOS class and retrieve the SerialNumber property, which contains the DELL Service Tag.

Make sure you have the appropriate permissions and access to the server/host you are querying.