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 <server_name>
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 <server_name>
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.