Wednesday, August 18, 2010

Query Dell Service Tags Remotely

I had a troublesome machine that wouldn’t allow any software to be installed on it and needed its service tag for warranty purposes, the machine was also in another state so was out of my reach.
the following simple scripts poll WMI and in a VERY simple window that anyone can use, allow you to find out its service tag quickly and easily.

Also in this case I also needed to know its model number and you can easily do so by dumping this servicetag into the drivers download section of the dell support site and it will list the model when it lists the drivers!

Of course this is a very manual process and there are much more effective inventory methods that scale.
Examples of such are Microsoft SMS/SCCM, Altiris, Dell Inventory Software, Spiceworks etc


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


Posted by admin in
Permalink
Page 1 of 1 pages