When Open Manage is installed, you can use run OMREPORT CHASSIS INFO from the command line to obtain the service tag. You can also send the results to a file. Complete documentation Open Manage CLI commands can be found online at
http://support.dell.com/support/edocs/software/svradmin/2.1/en/index.htm
.
You can do it via WMI, as well. Here's a simple VBS script to get service tag info from
localhost.
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
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:
Usual scripting disclaimers apply: don't run scripts you don't understand, don't blame me if it doesn't work, test it before you run it across your enterprise, etc.
Updated to fix a typo - set colitems equals objWMIservice... vs. set colitems minus objWMIservice...
Message Edited by sdcarroll on 09-15-2005 06:34 PM
Carrie_1
2 Intern
•
188 Posts
0
September 1st, 2005 12:00
sdcarroll
60 Posts
0
September 7th, 2005 00:00
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
Usual scripting disclaimers apply: don't run scripts you don't understand, don't blame me if it doesn't work, test it before you run it across your enterprise, etc.
Updated to fix a typo - set colitems equals objWMIservice... vs. set colitems minus objWMIservice...
Message Edited by sdcarroll on 09-15-2005 06:34 PM