I recently played around with adding registry data to SCCM Hardware Inventory using RegKeyToMof, but during the tests I ended up with a big problem, no clients were delivering any hardware inventory at all.

The problem quickly spread to all clients so I started the oh-so well known journey of troubleshooting.

First let’s look at the symptoms of the issue.

The Resource Explorer shows no inventory data for clients

clip_image001

Client Actions does not show the Hardware Inventory Action

image

The PolicyEvaluator.log file contains errors

clip_image002

A Bad MOF file is generated on the client

Things that did not work

  1. I tried replacing the configuration.mof in inboxes\clifiles.src\hinv from another SCCM site running the same version
  2. I tried disabling the hardware inventory in client settings
  3. I tried deleting the Hardware Inventory using Policy Spy
  4. I tried Hard Reset the policy on the client (Thanks for the Hint Mr. Agerlund)
  5. I tried reinstalling the client

The thing that did work

I ended up looking through the tables of the database to see if some reference to the MOF additions I had played with was leftover or maybe had names that could case SQL issues.

After a while I was more or less just poking around for any table with a name that seem to have a relation to inventory, and I came across the table HinvMOFs that contains two rows that somewhat looked familiar.

image

In particular the strange content of the configuration row, ÿþ/, came to my attention as they also appeared at the end of each of my bad policy files.

When I compared these rows with my test environment I saw that there was a major difference, my test env had the same rows but the configuration one contained a copy of a configuration.mof file.

I then made a quick backup of the database (as we always must do before doing the unspoken, which I was about to do …)

Copied the content of my test environment and pasted it into the defect database.

Forced a client to refresh its machine policy and then I was a happy camper with the option to run the Hardware Inventory action again.