Tuesday, February 19, 2013

Check serial on computer

Sometimes this needs to be verified remotely. Script below gets the job done.

strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colBIOS = objWMIService.ExecQuery _
    ("Select * from Win32_BIOS")
For each objBIOS in colBIOS 
    Wscript.Echo "Serial Number: " & objBIOS.SerialNumber

Paste in script.vbs

Not my code, but found it long ago and cant find the source.

No comments: