Dell Service Tag

Revision as of 16:10, 22 August 2008 by Root (talk | contribs) (→‎Windows)
Jump to navigationJump to search

You can get the Dell Service Tag from a machine remotely. You don't have to look up Service Tag from an inventory list and you don't have to go try to read the number off the tiny sticker. It turns out that Dell puts the Service Code into BIOS. You can query the BIOS for the Service Tag.


dmidecode -s system-serial-number

Some systems such as Red Hat and CentOS don't support the '-s' option so these system may need to do something a little tricky (it will probably print twice):

dmidecode | grep --extended-regexp Serial[[:space:]]Number:[[:space:]]*[A-Z0-9]{7}$
                Serial Number: 2M1XDB1
                Serial Number: 2M1XDB1


In Windows you can use a tiny VBScript to query the WMI for the Service Tag.

Save this script as `service_tag.vbs`:

If WScript.Arguments.Count = 0 Then
    Wscript.Echo "Usage: GetDesllSvcTag.vbs computer1 [computer2] [computer3] ......"
End If
For Each strComputer In wscript.Arguments
    Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
    Set colSMBIOS = objWMIService.ExecQuery ("Select * from Win32_SystemEnclosure")
    For Each objSMBIOS in colSMBIOS
        Wscript.Echo strComputer & ": " & objSMBIOS.SerialNumber

Start up a Command Prompt (cmd.exe) and run the `service_tag.vbs` script to get something like this:

C:\Documents and Settings\Administrator\Desktop>service_tag.vbs 2M1XDB1