Friday, February 19, 2010

Find Server Serial no by VBS

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 "Manufacturer: " & objBIOS.Manufacturer

    Wscript.Echo "Serial Number: " & objBIOS.SerialNumber

Next

Print Friendly and PDF
Share/Bookmark

No comments:

Post a Comment