Retrieve Dell Service Tag VBScript

On December 26, 2008, in Programming, by Mike Hudson

Use this VBScript to retrieve the dell service tag of a machine without having to get out of your seat!

1
2
3
4
5
6
7
8
9
10
11
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 & "rootcimv2")
set colitems = objWMIservice.ExecQuery("Select * from Win32_BIOS",,48)
For each objitem in colitems
if objitem.serialnumber ="" Then
Msgbox "No tag was available!"
Else
Wscript.echo "Dell Service Tag: " & objitem.serialnumber
End If
Next
Tagged with:  

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!