Hardware Inventory and the Database

July 3rd, 2009 | Posted by Jason in ConfigMgr 2007 | Configuration Manager

It is pretty well known how to add custom extensions to the Configuration  Manager hardware inventory using sms_def.mof and configuration.mof. What isn’t well-known or documented (at least not that I could find), was how to check-up on or remove a custom extension from ConfigMgr manually. There are two tools that can help you with deleting the extension: delgrp.exe (available from the SMS 2003 resource kit) and SiteSweeper from SCCMExperts. But what do you do if these tools aren’t working for you or you simply want to check up on your extension?

First, it is important to note that a best practice for custom inventory extensions is to always test them on a test ConfigMgr site; however, most folks don’t have test installations of ConfigMgr and even if they do, the data isn’t necessarily representative of the data in their production site.

The following is of course completely unsupported — by Microsoft or me — so tinker with the DB at your own risk (or peril). Make sure that you have a good DB backup as a simple restore should get you back to where you were if you foobar something.

The following database objects are involved with HW extensions (where Extension_GroupID is the name of the group as specified in sms_def.mof by the SMS_GROUP_NAME qualifier).

Tables:

  • InventoryClass — Lists extension classes
  • InventoryClassProperty — Lists properties of extension classes, references rows in the InventoryClass by InventoryClass.ClassID
  • DataItem — References rows in the InventoryClass by InventoryClass.ClassID
  • DataItemProperty — References rows in the InventoryClass by InventoryClass.ClassID and rows in InventoryClassProperty by InventoryClassProperty.PropertyID
  • GroupMap — Maps the class ID to the tables in the database
  • Extension_GroupID_DATA — Contains data for the extension
  • Extension_GroupID_HIST — Contains history data for the extension

Views:

  • v_GS_Extension_GroupID0 — View used for actual data retrieval/reporting
  • v_HS_Extension_GroupID0 — View used for historical data retrieval/reporting
  • vex_GS_Extension_GroupID0 — ?

Stored Procedures:

  • pExtension_GroupID_DATA
  • dExtension_GroupID_DATA

The WMI repository on the site server also contains information about HW extensions in the root\SMS\Site_XYZ namespace (where XYZ is the site code). The following classes will exist:

  • SMS_G_SYSTEM_Extension_GroupID
  • SMS_GH_SYTEM_Extension_GroupID
  • SMS GEH_SYSTEM_Extension_GroupID

Removing the rows referencing the extension from the first five tables listed above, deleting the other DB objects, and deleting the WMI classes listed, should remove a hw extension from ConfigMgr. Note that deleting WMI classes also deletes all instances of the class. You can also simply monitor the tables if you just want to verify the data or creation of the proper objects. It is of course possible and likely that the above list is not all inclusive, but in my (limited) testing, this is what turned up.

You can follow any responses to this entry through the RSS 2.0 You can skip to the end and leave a response. Pinging is currently not allowed.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

*

%d bloggers like this: