Windows::Network Management::Scripting::Get Serial Number of Remote Machine
I need to query all the machines in Network neighborhood to get their serial numbers.
This WSH script is a place to start:
ComputerName = InputBox("Enter the name of the computer you wish to query")
winmgmt1 = "winmgmts:{impersonationLevel=impersonate}!//"& ComputerName &""
'WScript.Echo winmgmt1
Set SNSet = GetObject( winmgmt1 ).InstancesOf ("Win32_BIOS")
for each SN in SNSet
MsgBox "The serial number for the specified computer is: " & SN.SerialNumber
Next
Ideally this would be a perl script that generates an HTML report of all the machine names and serial numbers (and IP numbers.) This could be launched via a weblink on server and get back report.
The next step would be to compile a txt file with a listing of all the serial numbers found so far and as the discovery is being done only add the new ones to the list.
No comments:
Post a Comment