hi,
I was wondering if their was a way to search for computers on the network by seaching by a Serial Number.
Why? I have people calling me with a serial number and wanting to know what the PC Name is and who was on it last.
Right now, all I can do is search by PC Name and return the serial (not the other way around)
Any Help?
Wondering if this code can be edited and be turned around?
I was wondering if their was a way to search for computers on the network by seaching by a Serial Number.
Why? I have people calling me with a serial number and wanting to know what the PC Name is and who was on it last.
Right now, all I can do is search by PC Name and return the serial (not the other way around)
Any Help?
Code:
MyHostName = InputBox ("Enter Machine Name")
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & MyHostName & "\root\cimv2")
Set colSMBIOS = objWMIService.ExecQuery _
("Select * from Win32_SystemEnclosure")
For Each objSMBIOS in colSMBIOS
pn = "Part Number: " & objSMBIOS.PartNumber
sn = "Serial Number: " & objSMBIOS.SerialNumber
sn1 = objSMBIOS.SerialNumber
an = "Asset Tag: " & objSMBIOS.SMBIOSAssetTag
Next
tmp = InputBox (pn & VBCrLf & sn & VBCrLf & an,"Computer Serial Number",sn1)
Comment