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
Next

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

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.