共用方式為


Management Exception While executing Desired Configuration Monitoring Engine

You might run into a Management Exception while executing the DCM Command Line Wrapper (also called the DCM Engine). It’s a general practice to copy the bits of the DCM Engine to another machine in order to execute the engine on the other machine. In this process, you might forget to copy over the DCM.MOF file. This file is very essential.

The DCM.MOF file defines the DCM-related WMI classes. When the command line wrapper is executed, it first checks if both the WMI classes for DCM exist in the WMI repository. If they do not exist, the command line wrapper executes the DCM.MOF file to create the WMI classes. In the event if the mof file does not exist in the folder (possibly not copied), then it will fail to create the WMI classes. When the rules are evaluated, and when an event is ready to being published to the WMI repository by the DCM Issue Processor, it does not find the appropriate classes in the WMI repository. Hence, it throws a Management Exception. It might look similar to this:

System.Management.ManagementException: Invalid namespace

   at System.Management.ManagementException.ThrowWithExtendedInfo(ManagementStatus errorCode)

   at System.Management.ManagementScope.InitializeGuts(Object o)

   at System.Management.ManagementScope.Initialize()

   at System.Management.ManagementObject.Initialize(Boolean getObject)

   at System.Management.ManagementBaseObject.get_wbemObject()

   at System.Management.ManagementClass.CreateInstance()

   at DCMCmd.DCMCmd.Main(String[] argsParm)

If you happen to see this exception in the NT Event log (Application section), ensure that you have the DCM.MOF file in the same folder as the DCM Command Line Wrapper (where you have DCMCmd.exe and other bits) and re-run the DCMCmd.exe. That should fix the problem.

You might also be interested in knowing the files that are required in order to execute the DCM Engine. I have posted another article on the blog which gives a listing of the required files. You can find the post here.

Thanks!