Report a Dell Service Tag Remotely

Create a text file with the following: 

ComputerName = InputBox("Computer Name")
strComputer = ComputerName
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colSMBIOS = objWMIService.ExecQuery _
("Select * from Win32_SystemEnclosure")
For Each objSMBIOS in colSMBIOS
Wscript.Echo "Service Tag: " & objSMBIOS.SerialNumber

Save it as a vbs then run:

cscript filename.vbs

You will need to run the script with the correct permissons to WMI.

Written on January 7, 2009