Error 80041001 in InventoryAgent.log after mof files modifications
I’ve been playing with SCCM mof files this weekend. After I’ve extended configuration.mof and sms_def.mof files to inventory a registry key during hardware inventory, I noticed below error logged in InventoryAgent.log on SCCM client:
Unknown error encountered processing an instance of class <name of the WMI class>: 80041001
I checked the SCCM client, the WMI class was created correctly, but the inventory data was not loaded in the SCCM database therefore I could not view it in Resource Manager.
After gone through both configuration.mof and sms_def.mof many times made sure they are 100% correct, I found this error is actually caused by a bug in SCCM 2007.
Because the SCCM client I’m using for testing is a Windows 2008 R2 machine (therefore 64 bit) and the issue with 64 bit client is documented here.
Also, while I was playing with mof files, I found this awesome tool called RegKeyToMOF. The current version is v3.0 and can be found here. It supports SMS 2003, SCCM 2007 and SCCM 2012 Beta 2.
it automatically generates mof extensions for you when you select the registry key that you want to inventory:
If you are planning to use this tool to generate the configuration.mof and sms_def.mof extensions, please make sure you tick “Enable 64bits (for Regkeys not written in Wow6432Node)” if you have 64-bit SCCM clients in your environment (nowadays, I can’t imagine that you don’t!). This is also what above mentioned KB article suggested.