Skip to main content

OLE Dispatch Exception Code 0 SWbemObjectSet: Invalid Class

You can receive error 0x80041010 from multiple applications that call WMI. For my example it was received in Computerlink while checking for the port server process.

OLE Dispatch Exception.png

This can be triggered by running the systeminfo command in a command prompt or applying patches in SCCM.

No matter where you got the error the underlying issue is probably with WMI. Here is how to check!

Confirm WMI is Broken:

Launch the WMI MMC snapin by clicking Start -> Run then enter wmimgmt.msc

Right click WMI Control (Local) and click Properties

WMI Control Local.png

If WMI is working properly then it will show the system information. If you see Invalid class then your WMI is not working correctly.

WMI Control Invalid.png

Invalid

WMI Control Good.png

Good

The most likely cause is MOF Registration Errors

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

CD C:\Windows\System32\WBEM dir /b *.mof *.mfl | findstr /v /i uninstall > moflist.txt & for /F %s in (moflist.txt) do mofcomp %s

Here is what the command looks like while it runs:

MOF Registration.png

Once finished check wmimgmt.msc to see if it is populating the Properties correctly.

WMI Control Good.png