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
To retrieve the DELL Service Tag for a Dell server/host in VMware 6.7 using PowerShell, you can use the following command:
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.