MhermanNBME
Posts: 78
Score: 3 Joined: 4/4/2007 Status: offline
|
I know there is monsernum.vbs out there, but it wasn't working for me, so I found a script that was working, and adapted it to inventorying and sccm, so I figured I'd share it. I started with this script that seemed to work pretty well: http://cwashington.netreach.net/depo/view.asp?Index=1087 I edited it to to be sccm friendly (it's attached). Here is the section to look at first, right after all the beggining comments (i left the orginal author's comments in). ------ 'here are the variables for dumping to the registry Dim blnRegDump,strRegDumpLoc blnRegDump=1 strRegDumpLoc="SOFTWARE\Tools\MonitorInfo\" 'must have trailing \ Const REGDUMPHIVE=&H80000002 'hklm ---- blnRegDump will determin where the information is sent, 1- goes into the registry, anything else will echo it. strRegDumpLoc specifies what registry key will go to, note if you change that, you will have to change the mof file. The structure will be like this HKEY\strRegDumpLoc\MonitorSerialNumber, with all the details as string values. Once that was ready, I created the mof edits (also attached). Pretty self explainitory, using the dynamic reg provider. Then I put it on my server, and checked WMI, everything looked good. Pushed the script the the clients, then hardware inventory, and everything is working well. I ran mofcomp on all the clients, since I already had the system setup, but i don't think you need to anymore with sccm2007. You have to give it some time for the first to show up, then they'll start pouring in. Here are some notes: Not all monitors report EDID information. If it doesn't find a serial number, it doesn't report anything. I'm not sure how dual monitors will report. It's possible to report a past monitor as well as or instead of the current monitor. If the computer was turned on before the monitor, the script will not be able to get the edid. With KVM’s the pc needs the focus during the bootup. If you changed the reg path in the script, make sure you change the path in the mof edits [ dynamic, provider("RegProv"),ClassContext("local|HKEY_LOCAL_MACHINE\\SOFTWARE\\Tools\\MonitorInfo")] I know the script could be cleaned up and reworked a lot, but it works, and should be fairly easy to debug still. Good luck.
Attachment (1)
|