A. How you query a server’s asset tag number depends a lot on your server hardware. Many manufacturers put asset tag information into the server’s BIOS serial number. Dell, for example, can write its service tag number into the BIOS serial number. If that’s the case, you can query it using this command:

Get-WmiObject Win32_BIOS -computerName

The resulting Win32_BIOS object has a SerialNumber property. So, you might assign the object to a variable, then use a dot to access that property:

$bios = Get-WmiObject Win32_BIOS -computerName

If your server manufacturer puts the asset tag information elsewhere, the information might not be accessible using Windows Management Instrumentation (WMI). If you’re using a custom asset tag, you can look into a variety of free and commercial utilities that are capable of writing that to the BIOS serial number field on some servers. Many server manufacturers can provide you with utilities to accomplish this.