Thursday, May 08, 2008

Remotely retrieve service tag from dell machines

Copy and paste this script to a .vbs file

strComputer = inputbox("Type the name of the computer with out \\ or an IP address to find out the service tag")

if strComputer = "" then wscript.quit

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 (serial number): " & objSMBIOS.SerialNumber

Thanks to Thewhip

1 comment:

Anonymous said...

Thank you for the script. It works fantastic!