ROKUS.net - Home
 Home    sdcarroll*gmail   

  Testing...

· Today on AFN-K

Ha Ha
Click for Ewa Beach, Hawaii Forecast

  Main Menu
· TrackBack Tool


  Topics
· Blogs
· Dell Servers
· Korea
· Microsoft - Servers
· Microsoft - Exchange
· Misc
· Security
· XML

· · ·All Articles· · ·

  Voice Over IP

Please click

  Last 10 Articles...
· Reading this post will save you ten bucks...
· National Treasure (2004)
· Become your own webhost.
· Mok-dong (Seoul) Immigration Office Hours
· Need to publish confidential documents? Microsoft Redaction tool may be for you!
· RSS and XML: Seoul Computer Club Presentation.
· Operations Guides
· Cool Optical Illusions
· Microsoft releases SNARF - an email relationship tool
· Link Dump / Exchange

  Search this site
Google

ROKUS.NET


This blog is no longer updated.

Since I own the domain name for a couple more years, and the hosting was paid-in-advance, it's still here. But I've moved on to Hawaii, and no longer have the need to publish all the sorts of neat stuff that made up the contents of this website.

If you've linked to me, you are invited to unlink, as your readers will no longer be presented with new content. Thanks, Steve
Query Dell Service Tag via WMI
Thursday, September 15, 2005 : Stephen D. Carroll, rokus.net

Need to find a Dell Service Tag number?

Here's a quick VBS script to pull that info "across the wire" - remotely, that is...

First, this basic script will get it from "localhost" (please note the second line strComputer = ".")
'------START/Don't include this line------------
'
on error resume next
strComputer = "."
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
'
'------END/Don't include this line---------------


---------------
If you want a pop-up box to input the name of a remote host, you can modify the second line to:
    strComputer=InputBox ("Enter the computer name of the server you'd like to query for Service Tag")

Both versions above can be run like this: "cscript servicetag.vbs"

---------------
If you want to use the command line, you can change the second line to:
    strComputer=WScript.Arguments.Item(0)

...and run like this instead: "cscript servicetag.vbs machinename"

---------------
If running this against multiple machines (and redirecting output to a text file), you can change the output line (Wscript.echo) to:
    Wscript.echo strComputer & ": " & objitem.serialnumber

...and run like this:
C:\myscripts\> cscript servicetag.vbs machine1 >> outputfile.txt
C:\myscripts\> cscript servicetag.vbs machine2 >> outputfile.txt
C:\myscripts\> cscript servicetag.vbs machine3 >> outputfile.txt
C:\myscripts\> cscript servicetag.vbs machine4 >> outputfile.txt

---------------
Note that this does *NOT* work across domain boundaries - if you want to check a box on a different domain, map a drive to "C$" first.








Permalink |   Mail this...

Query Dell Service Tag via WMI | Login/Create an account | 0 Comments
Comments are owned by the poster. We aren't responsible for their content.




  Help Desk Manager    

Logos not available:
Dell Certified Storage Network Professional
Snort Certified Professional



Standard disclaimers apply: This website contains the personal opinions of the author,
and is neither endorsed nor sponsored by the United States government, its agencies,
nor anyone else, to include my employer, my coworkers, my friends, or anyone
that I haven't yet met. If you nonconcur with what's included on this site, either
(a) leave a comment, send me an email, or tell me if you see me (e.g. "feedback") or (b) don't.

These guys make me look good: