Case of the missing Hardware Inventory

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.


Comments (10):

  1. Matt Z. says:

    Thanks for this. After editing a MOF to add more hardware classes my hardware inventories failed. Restoring the old file didn’t help, and after finding this I did check the database and it still had the old invalid configuration in the HinvMOFs table

  2. Stavros C. says:

    You saved me a whole lot of trouble Ronnie. I had the same issue as you when I tried to tweak the configuration.mof file. Although I had the option to run HINV on clients I got only 10% of the classes report back to the server.

    Thanks man

  3. Mike says:

    Hi Ronnie
    I have the same issue – added classes for sql inventory
    just to confirm exactly what did you replace and how
    I need to get this fixed asasp
    thx

  4. Hi Mike, sorry I didn’t see your comment until now. All you really need to do is open the existing (working) configuration.mof file in notepad, and then copy the content into the field in the SQL table and save it. And finally update the timestamp field.

    I just had the problem occur Again today and I learned that the problem is that the file is unicode, if you open the file and save it as ANSI, SCCM will read the file and correctly update the timestamp.

    • Paul says:

      Ronnie,
      What table in sql did you find the mentioned problem. I can’t find any table that contains those fields

  5. Neha says:

    how will we update the timestamp field

  6. Ian says:

    I had the same issue with a bad configuration.mof and was able to correct it without touching the database directly. I also tried to copy the file from another environment but it would not update the database. I ended up editing the file and saving it so it got a newer time stamp. SCCM then processed the file and updated the database on its own. Any small change will do just to get a newer time stamp. I edited the part “Advanced Client SSL Security COnfigurations”. Just changed the O to lower case. :)

  7. Peter Alonso says:

    I just confirmed that changing a bit (changed the case on a letter) in the MOF file, in order to change the time stamp, fixed the above issue in a very short time. Thank you for all the good information.

  8. Jesse Lovicott says:

    I am missing the software portion under the hardware section. Would you have any suggestions on that?

  9. Kevin Brown says:

    Hi,

    I have the same issue but I am struggling to find the entry in the SQL database. Can you please explain where this entry is? I am pretty new to SQL so some help would be appreciated.

    Thanks

Leave a Reply