Yearly Archives: 2010

Script to scan for h/w serial number

I collegae of my asked a bunch off serials of servers. Instead of inspecting all the servers I used the following script :

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

Replace . with computername or ip address to scan a remote computer/server.