Inventorying RAMs Remotely on Windows
(Page 1 of 4 )
Say you need to find a remote solution for grabbing the values of RAM modules of a huge number of computers. This is not unusual for large companies that need to do inventories of some kind to keep track of all of their computers for maintenance purposes. We want to gather the manufacturer, serial number, model number, and other values for each module.
As we pointed out in our earlier article, there is a relatively seamless solution with a few lines of script code—based on WMI—we can try to query the SPD data of each RAM module. Unfortunately, when this approach was placed into action, the results weren’t promising at all. Lots of data were missing, most of which were truly required for our inventory needs, such as the manufacturer, part number, and serial number.
Windows Management Instrumentation, abbreviated WMI, is the interface that Microsoft designed with programmers in mind. It allows users to access certain parts and hardware components by providing a hardware abstraction layer. Querying via WMIs is really a task and can be done with scripting languages as well. Since this simple approach wasn’t enough for us, it was time to look further.
Once again, we got lucky, finding the following CodeProject article by wjfrancis. Apparently, the author realized the reason why querying the WMI does not return the required “depth” of information that it promises. In short, there is a limitation in the mechanism of WMI that does not parse and “make available” all of the gathered information. The author found a way around this. The results were satisfying.
In that article there is an entire story explaining the way you can peek into the SMBIOS to gather the necessary information in an approach similar to the way WMI does it when it loads up its collections and all that. In the end, though, it does not expose all of it. The source code that’s featured within that article is written in C++ and the application is console-based. Basically, it dumps and prints out the entire SMBIOS data. It’s in-depth!
Our task now is to show you how we can modify this application that already “does wonders” a tiny bit, and explain how we can execute it remotely on hundreds, if not thousands, of computers within a domain(s). Modifying is not compulsory, but you may find it essential to style the SMBIOS dump into the required form and shape. I’m sure you'll find out that it reports way too much information in the case of memories.
Next: Shaping the Output >>
More Windows Security Articles
More By Barzan "Tony" Antal