invalid class error for specific machines.

invalid class error for specific machines.

When taking access of a windows or Linux service we are getting the below error  of invalid class. This is machine specific.
Error screenshot has been attached in attachments,


Root Cause:






This error occurs due to when WMI is broken in the particular machine. To identify the same you have to follow below steps:

Launch the WMI MMC snapin by Start -> Run -> then enter WMIMGMT.MSC

Right click WMI Control (Local) and click Properties

If WMI is working properly then it will show that Good Properties. If you see Invalid class then your WMI then it is not working correctly and not an issue of Pam but machine issue.


Solution:
I have attached a document regarding the solution steps in the attachment. The same has to be shared to the clients team to resolve the issue.

The first step is to download the Microsoft WMIDiag Tool. It will analyze WMI and give you a report with any issues it finds.

When you run the downloaded .EXE it will ask you where to extract the files. Once extracted right click the WMIDiag VBScript and click Open with Command Prompt

Here is what the script looks like while it runs:

 

Once complete you will get a text file of the results. Here you should be able to narrow down the cause of your WMI issue. In my case there are issues with .MOF registration



Resolve MOF Registration Errors:

To resolve MOF Registration errors the following commands need to be ran from an elevated command prompt. It will reregister all .MOF files with WMI.



Once finished check WMIMGMT.MSC to see if it is populating the Properties correctly.