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
Client Actions does not show the Hardware Inventory Action
The PolicyEvaluator.log file contains errors
A Bad MOF file is generated on the client
Things that did not work
- I tried replacing the configuration.mof in inboxes\clifiles.src\hinv from another SCCM site running the same version
- I tried disabling the hardware inventory in client settings
- I tried deleting the Hardware Inventory using Policy Spy
- I tried Hard Reset the policy on the client (Thanks for the Hint Mr. Agerlund)
- 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.
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.
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
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
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
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.
Ronnie,
What table in sql did you find the mentioned problem. I can’t find any table that contains those fields
how will we update the timestamp field
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. 🙂
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.
I am missing the software portion under the hardware section. Would you have any suggestions on that?
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