How NOIDMIFs can extend your Hardware Inventory
ConfigMgr hardware inventory is a very important and widely used feature. We use it to collect all sorts of information, from hardware info such as disk configuration, amount of RAM, etc. Hardware Inventory is also used to query the Add/Remove Programs to see what software is installed on a machine.
All hardware being queried by default can be found in your SMS_Def.mof file (%ConfigMgrInstallDir%\Inboxes\clifiles.src\hinv). There are heaps of WMI classes that are enabled by default – and even more than you manually need to enable. But sometimes we need to collect hardware information for a non-standard piece of hardware, or a device that isn’t included in the SMS_DEF.mof file.
To cater for this type of inventory, we provide a function to extend the classes using special files call IDMIFS and NOIDMIFS.
Creating custom Hardware Inventory classes
By default the IDMIF/NOIDMIFS collection is not enabled, but to enable it open your Hardware Inventory Client Agent and tick the MIF collection boxes.
There's an interesting warning here – Enabling these settings increases your security risk by permitting ConfigMgr to collect and process unvalidated client data.
IDMIFS/NOIDMIFS are unlike the SMS_DEF.mof file as they are unvalidated. This means they aren’t checked against any standard and can contain pretty much anything. The problem with this is, any user who is a local administrator on their machine, can add a NOIDMIF file to their CCM directory, and ConfigMgr will process this directly into the database and create custom tables. While this isn’t a huge problem, it would not be hard for a rouge user to create hundreds or thousands of extra tables in your ConfigMgr database.
In my demo, I’m going to create a custom Hardware Inventory class called Wide World Asset Numbers. A company could use this class as a way to track asset numbers of their clients.
First of all, from one of my clients I’m going to browse to %Windir%\System32\CCM\Inventory\Noidmifs
To create this class, we create a text file in the Noidmifs directory, give it a relevant name (addclass1.mif) and insert something like this:
Name = "System Information" Start Group
Name = "Wide World Asset Numbers" ID = 1
Class = "wideWorldAssetNumbers" Key = 1
Name = "Computer Asset Number" ID = 1
Type = String(10)
Value = "414207" End Attribute
This would create a class called wideWorldAssetNumbers in your Hardware Inventory. For more info, see http://technet.microsoft.com/en-us/library/cc181210
If I now run a Hardware Inventory on the client I’ll see in the InventoryAgent.log that it was processed (I’m running this on a Site Server by the way, that's why the path is SMS_CCM\Inventory)
And if I check the hardware inventory on the client, I’ll now see a new class called Wide World Asset Numbers
You can also see a new table in the ConfigMgr database
And that’s how easy it is to create a new Hardware Inventory class, and a new ConfigMgr database table!