Hardware Inventory Action missing

Other than the obvious, if on your site server or client the Hardware Inventory action is missing, most of the time the issue is may be a misconfigured hardware inventory MOF file, configuration.mof, on your primary site.
In this case, the Hardware Inventory Action was missing on some of the Primary site Server as shown in the following figure.

Also looked in %systemroot%\system32\wbem\logs --> mofcomp.log file, it was showing  following error


Error Number: 0x80041026, Facility: WMI
In this case the MOF file it was compiling was correct, but somehow from the log file it was showing that there is some issue with WMI.
As per the above error, while compiling the mof file, the attempt was made to delete or modify a class that has instances in WMI. But anyway it was not happening.
Further we compared the sms_def.mof file objects with the WMI & found that one additional customized entry in WMI. On further investigation we found that earlier, some day’s back one sms_def.mof file was tested on these servers & it had created class & instance entry into the WMI. Anyway this entry was not there in current sms_def.mof file, so while compiling new mof file it was generating the above error. So we decided to remove this customized instance from WMI.

Following are the steps to delete the instance in WMI. Ref.
1.    Go to cmd prompt & type: wbemtest
2.    In the Windows Management Instrumentation (WMI) Tester dialog box, click Connect.
3.    In the Namespace box, type the path to the namespace that you want to connect to.
     for example:
  To connect to the namespace where the Win32 provider classes reside, type:
                         root\cimv2

4.    Click Connect.
5.    Click Delete Instance.
     The Get Object Path dialog box appears.

6.    Type the relative object path for the instance you want to delete.
      for example :
To delete an instance of MyClass where the key property is F122, type:
      MyClass.KeyProperty="F122"


Let’s go to find out detailed information of MyClass, KeyProperty & the instance
Go to cmd prompt & type wbemtest
Connect to Namespace:  root\cimv2
Click on Enum Classes & choose Recursive, Click on OK & go to the class.
In this case it was WINReg_XP_Info

Double click on the class & go to Keyproperty.  In this case it is CCode
Then click on Instances & you will find instance  

To delete the instance follow below steps
After connecting to the namespace where the Win32 provider classes reside, type: root\cimv2
Click Connect & Click Delete Instance.
The Get Object Path dialog box appears.
Type the relative object path for the instance you want to delete.
for example :

Next compilation of mof file was successful. It shows in the mofcomp.log file.
After compiling mof file successfully it is showing Hardware Inventory Cycle again.

Comments

Popular posts from this blog

Description = "User \"Domain\\SCCMAdmin2\" does not have permissions to grant rights on this instance."; ErrorCode = 1112017920;

SMS Advanced Client Push Installation process