Tuesday, August 28, 2007

Computer Bios Script (bios.vbs)

Here is a quick little script that will display both the manufacturer and serial of your computer. You can easily add in a variable to create a list of ALL of the machines in your environment. Say... from AD.... :P

On Error Resume Next
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * from Win32_BIOS",,48)
For Each objItem in colItems
Wscript.Echo "Manufacturer: " & objItem.Manufacturer
Wscript.Echo "SerialNumber: " & objItem.SerialNumber

Next

No comments: