Retrieve Serial Tag from a Dell computer using VBS Script

21/03/2007 17:33 | Hardware | 4734 views | RSS

Here ya go, works on every Dell I’ve used it on, and the best part of it is that it doesn’t need the OpenManage tools installed!

strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colSMBIOS = objWMIService.ExecQuery _
("Select * from Win32_SystemEnclosure")
For Each objSMBIOS in colSMBIOS
Wscript.Echo "Serial Number: " & objSMBIOS.SerialNumber
Next

Idiot-proofness: copy the following in a file, save it as bla.vbs and then double click it.