Query Dell Service Tag

By | February 12, 2006

Because most of the computers I work on are Dell’s, a lot of times I need to look up the service tag for a specific machine. Without the need of bulky software, you can easily use WMI to gather this information. This article will show you how to remotely query your dell pc’s for their service tags.

Open notepad and copy the following text and paste it into your blank notepad

———-COPY EVERYTHING BELOW THIS LINE———-

on error resume next
strComputer=InputBox (“Enter the computer name of the server you’d like to query for Service Tag”)
Set objWMIservice = GetObject(“winmgmts:\\” & strComputer & “\root\cimv2”)
set colitems = objWMIservice.ExecQuery(“Select * from Win32_BIOS”,,48)
For each objitem in colitems
Wscript.echo “Dell Service Tag: ” & objitem.serialnumber
Next

———-COPY EVERYTHING ABOVE THIS LINE———-

PLEASE MAKE SURE NO WORD WRAPPING IS HAPPENING IN YOUR NOTEPAD!!!

save the file as DellServiceTag.vbs to a location you will remember

when you execute the script, it will prompt you for a computer name, type in the computer name of the dell machine you are trying to gather information from into the message box and hit OK

You will then receive another message box with the dell service tag.

If you want to run this against multiple machines then do the following:

Open notepad and copy the following text and paste it into your blank notepad

———-COPY EVERYTHING BELOW THIS LINE———-

on error resume next
Wscript.echo strComputer & “: ” & objitem.serialnumber
Set objWMIservice = GetObject(“winmgmts:\\” & strComputer & “\root\cimv2”)
set colitems = objWMIservice.ExecQuery(“Select * from Win32_BIOS”,,48)
For each objitem in colitems
Wscript.echo “Dell Service Tag: ” & objitem.serialnumber
Next

———-COPY EVERYTHING ABOVE THIS LINE———-

PLEASE MAKE SURE NO WORD WRAPPING IS HAPPENING IN YOUR NOTEPAD!!!

Save the file as bath_DellServiceTag.vbs

Now open a new Notepad and follow this format:

C:\path\to\my\scripts\> cscript servicetag.vbs pc1 >> service_tag.txt
C:\path\to\my\scripts\> cscript servicetag.vbs pc2 >> service_tag.txt
C:\path\to\my\scripts\> cscript servicetag.vbs pc3 >> service_tag.txt
C:\path\to\my\scripts\> cscript servicetag.vbs pc4 >> service_tag.txt

Replace pc1, pc2, pc3 with your actual computer names.

save the file as dell_service_tag.bat.

Double click on the  dell_service_tag.bat file and you will be left with service_tag.txt with all of your PC’s Dell Service tags inside

This information was found on http://www.rokus.net/.

This information is provided “AS IS” with no warranties expressed or implied.

 

Leave a Reply

Your email address will not be published. Required fields are marked *