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.