Sponsored Links

Login Form






Lost Password?

Syndicate

Home arrow Knowledgebase arrow Windows arrow Query Dell Service Tag
Query Dell Service Tag PDF Print E-mail
User Rating: / 19
PoorBest 
Written by LazyNetworkAdmin   
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.

 

Comments
Add NewSearch
jason - convert this code to express s   | 69.95.159.xxx | 07-02-2007 16:43:15
http://www.wlscripting.com/tutorial/35

give how to convert this code into the express service code...Does anyone have a vbs code to do the same?
leo - script multiple machines   | 63.138.227.xxx | 12-02-2007 20:45:07
I followed your steps, however, it did not work in multiple machines. please advice
leo   | 63.138.227.xxx | 12-02-2007 20:45:22
1514





leo - script multiple machines
IP:63.138.227.162 | 2007-02-12 20:457







I followed your steps, however, it did not work in multiple machines. please advice







Reply
0 0






]]>1
John   | 129.176.151.xxx | 27-11-2007 14:33:22
I love this little script. It saves me the headache of calling a user or taking a trip across town to get the service tag off a computer. My only suggestion would be to add an error handler for systems that it can't find rather that no response.

But thank you.
Jim - MoonPoint Support     | 72.45.15.xxx | 10-01-2008 23:54:47
Thanks for the script. I needed to produce a list of the service tags for all of the Dell systems at a site from a remote location. Your script allowed me to do so.

I modified the script so I could query multiple systems by listing all of them at once on the command line instead of listing them in a batch file. I also added code to indicate a system is inaccessible, if it couldn't be queried, as suggested by John.

The modified version is available at http://support.moonpoint.com/downloads/computer_languages/VBScript/Dell-ServiceTag.vbs

Thanks again!
Phoenix   | 72.29.232.xxx | 20-05-2008 15:07:53
How does your verson work exactly?
Phoenix   | 72.29.232.xxx | 20-05-2008 13:01:18
Hey I'm also having trouble with the multi-script service tag finder, and I can't quite figure out Jim-MoonPoint Support one either.
Duane   | 144.232.209.xxx | 20-05-2008 16:07:39
Are you getting (system inaccessible) errors after running the command ?
Phoenix   | 72.29.232.xxx | 21-05-2008 13:38:51
Yes I am, but I'm guessing that's becuase the computer in question is nolonger hooked up to the network or is coming in wirelessly
Anonymous   | 129.112.109.xxx | 24-06-2008 14:45:32
Sniffles - IT   | 199.103.32.xxx | 18-08-2008 13:57:48
Okay, this works like a charm. Can it be possible to be able to grab the Express service number as well as the Service Tag number.
Write comment
Name:
Email:
 
Website:
Title:
UBBCode:
[b] [i] [u] [url] [quote] [code] [img] 
 
 
 
Security Image
Please input the anti-spam code that you can read in the image.

Copyright (C) 2007 Alain Georgette / Copyright (C) 2006 Frantisek Hliva. All rights reserved.

 
Tag it:
Delicious
Furl it!
Spurl
digg
YahooMyWeb
< Prev   Next >
 

Google Search

Google

Get Firefox