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.


68 Words

2009-01-07 10:07 +0000