Sponsored Links

Login Form






Lost Password?

Syndicate

Home arrow RSS Feeds
Query Dell Service Tag PDF Print E-mail
User Rating: / 23
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 New
jason  - convert this code to express s   |69.95.159.205 |07-02-2007 16:43:15
http://www.wlscripti ng.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.162 |12-02-2007 20:45:07
I followed your steps, however, it did not work in multiple machines. please
advice
Anonymous  - Correct code for multiple machines   |12.104.204.211 |29-12-2008 19:28:27
Correct code for multiple machines:

on error resume next
Set ArgObj =
WScript.Arguments
Se t WshShell = WScript.CreateObject ("WScript.Shell&
#34
strComputer = ArgObj(0)

Set objWMIservice = GetObject("winmg
mts:\\" & strComputer & "\root\c imv2"
set colitems
= objWMIservice.ExecQu ery("Select * from Win32_BIOS",,4
For each
objitem in colitems
Wscript.echo strComputer & ": " &
objitem.serialnumber
Next
Anonymous  - Correct code for multiple machines take 2   |12.104.204.211 |29-12-2008 19:48:05
Stupid smileys hosed up the code. Remove spaces before and after the quotes on
lines 3 and 5. Also remove space between 48 and ) on line 6. Be sure to remove
the line numbers too.

LINE1 on error resume next
LINE2 Set ArgObj =
WScript.Arguments
LI NE3 Set WshShell = WScript.CreateObject ( "
WScript.Shell " )
LINE4 strComputer = ArgObj(0)
LINE5 Set objWMIservice =
GetObject("winmg mts:\\" & strComputer & "\root\c
imv2 " )
LINE6 set colitems = objWMIservice.ExecQu ery("Select * from
Win32_BIOS",,48 )
LINE7 For each objitem in colitems
LINE8 Wscript.echo
strComputer & ": " & objitem.serialnumber
LINE9 Next
leo   |63.138.227.162 |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.7 |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.17 |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 link:http://support .moonpoint.com/downl oads/computer_langua ge
s/VBScript/Dell-Se rviceTag.vbs

Than ks again!
Phoenix   |72.29.232.81 |20-05-2008 15:07:53
How does your verson work exactly?
Phoenix   |72.29.232.81 |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.122 |20-05-2008 16:07:39
Are you getting (system inaccessible) errors after running the command ?
Phoenix   |72.29.232.81 |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.250 |24-06-2008 14:45:32
Sniffles  - IT   |199.103.32.16 |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.
Joe  - Is operations   |70.60.73.155 |08-09-2008 14:18:59
Does anyone know if you can use WMI to change the code? I have several that had
motherboard replacements that I would like to change. Dell is playing dumb and
the Dell tools I have found on line do not work for the model I am working with.
Write comment
Name:
Email:
 
Title:
 
:angry::0:confused::cheer:B):evil::silly::dry::lol::kiss::D:pinch:
:(:shock::X:side::):P:unsure::woohoo::huh::whistle:;):s
:!::?::idea::arrow:
 
Please input the anti-spam code that you can read in the image.

3.26 Copyright (C) 2008 Compojoom.com / 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