Inventorying HDDs Remotely on Windows
(Page 1 of 4 )
Resource management and IT inventory is the task of many system administrators and IT specialists. Larger businesses or corporations with thousands of computers hire experts to get the job done. In the case of small-to-medium-sized firms, however, where only a couple hundred computers are involved, it is more cost-effective for these tasks to be handled by the IT staff. In this article we’ll look into a solution that does this remotely.
Before we begin, let’s also describe our scenario. We'll explain the easier, most obvious approach that seemingly could work, but when applied, doesn’t live up to the promise. IT inventory is about storing, in some sort of centralized environment, all of your information and data regarding hardware components. Right now, we'll target disk drives. Therefore, we want to query for the manufacturer’s name, model number, size, firmware, serial number.
Anyone having experience with scripting or programming on Windows platforms might yell already that WMI is the obvious solution. Windows Management Interface, abbreviated WMI, provides a model through which you can retrieve management information of various hardware components since it is a set of extensions to the driver model. Querying the WMI data for HDDs is possible with just a few lines of code.
Therefore, once you face a situation with requirements like ours, you will start to look for third party utilities or available API to write a script or a tiny, nifty utility to get the job done. There are numerous solutions that you can find, which are built on top of WMI. Unfortunately, in a real-world situation, these all fail miserably. Out of hundreds of PCs within a domain, WMI turned out to be of no use.
If you doubt the practicality of WMI functions, then here’s the data you'll need to try it out yourself. The hard drive model number is found within the Win32_DiskDrive class, while the serial number is inWin32_PhysicalMedia. And there’s a published article featuring source code written in C# based on WMI. Been there, done that. That solution did not suffice for our needs at all. So we looked further.
On the next page we will explain the approach of a solution that works.
Next: The Approach >>
More Windows Security Articles
More By Barzan "Tony" Antal