Edit

Invalid data error when you import a MOF file in Configuration Manager

Original product version:   Microsoft System Center 2012 Configuration Manager
Original KB number:   2690570

Summary

This article helps you resolve an Invalid data error that occurs when you import a Managed Object Format (MOF) file to customize hardware inventory in Configuration Manager. This error indicates that the MOF compiler can't parse the file. This article explains how to scan the file for issues so that you can fix them.

Symptoms

When you try to import a MOF file in the Configuration Manager console, the file doesn't open and you receive an error message that states that the file contains invalid data.

Cause

The MOF file contains invalid syntax or other data that the MOF compiler can't parse.

Solution

Validate the MOF file by using the MOF compiler (mofcomp.exe). The -check option validates the MOF syntax without adding classes or instances to the Windows Management Instrumentation (WMI) repository.

  1. Open a Command Prompt window.

  2. Change to the directory where you saved the MOF file.

  3. Run the following command:

    mofcomp.exe -check <YourMOFName>.mof
    
  4. Correct each error that the command reports, and then run the command again. Repeat this step until the validation completes without errors.

  5. Import the corrected MOF file in the Configuration Manager console.