Backing Up WMI Data

You can back up the WMI CIM Repository to ensure that it can be restored in case of data corruption or loss. You can back up the CIM Repository by using WMI Control or by using Winmgmt /backup at the command prompt. You can restore the CIM Repository if you think that the WMI data is corrupted or lost. However, any changes that were made since the backup was created will be lost.

Usually, WMI has more than 600 classes. Using the scripts in the "Verifying the State of the CIM Repository" section later in this appendix, you can determine how many classes are in your CIM Repository. If you have significantly fewer than 600 classes, then a restore or recovery of the repository might be appropriate.

If you do not have a recent backup of the CIM Repository to restore, you should avoid deleting it. While it is true that WMI can automatically recover much of the CIM Repository, you will lose instances and customizations that are not included in the automatically recovered MOF files. Because you might have several management applications or operating system subsystems that rely on WMI, deleting the CIM Repository might fix errors for one but cause problems for another.

If the CIM Repository does not automatically recover when it should (for example, when the CIM Repository becomes corrupted and WMI restarts), you can try to force an automatic recovery of the CIM Repository by using the command Regsvr32 wbemupgd.dll (from the %Windir%\System32\Wbem directory). If this does not work, you can also try the command Rundll wbemupgd.dll, RUNDLLENTRY. These commands should force WMI to automatically recompile the MOF files that were compiled with the Autorecover option.

For More Information

Did you find this information useful? Please send your suggestions and comments about the documentation to smsdocs@microsoft.com.