RegKeyToMof is a useful tool for any Microsoft Endpoint Configuration Manager (MEMCM / MECM / SCCM /ConfigMgr / CM)  administrator. This tool allows you to inventory registry keys on a PC and return the data back to CM. At this point you can do whatever you want to the data – create reports, create collections, etc. ***updated June 27 2016 new link for RegKeytoMOF ***

I recently received an email from a client asking to help them with this tool. They asked, “Do you know the process for using RegKeyToMof.exe and how to append the configuration.mof and/or importing MOFs? This might be a tremendous help because I haven’t seen a definitive guide.”

My hope is to put a definitive guide together in this blog post.
I will only show step-by-step instructions for System Center 2012 Configuration Manager (CM12), but if you are using CM07 you can follow these steps by using the Configuration Manager tab and the sms_def.mof tab and files.
I also recommend that you back-up your configuration.mof file (CM12 and CM07) and your sms_def.mof file (CM07).

How to Use RegKeyToMof

With CM, I will assume that:
· You are looking for static keys under: HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Terminal Server\RCM
· You already downloaded RegKeyToMof from:

How to Use RegKeyToMof

First, browse to the registry key in the upper left window.
Broswing the Registry with RegKeyToMof
Next, change the ClassGroup and ClassName. This is an optional step, but I recommend doing this so that you can ensure that the mof edit is unique. In the example you can see that I changed ClassGroup from “Custom” to “Enhansoft” and ClassName from “RCM” to “ES_RCM”.
Define RegKeyToMof - ClassGroup -ClassName
You will notice that as you make changes in the various text boxes, the configuration.mof text will also change. Really, that’s all there is to the tool. It creates the mof edits that you require and now all you have to do is append / import these edits to the appropriate files.

Now, let’s start with appending the text to the configuration.mof file.

Open your configuration.mof file located here, <CM install directory>\inboxes\clifiles.src\hinv, and scroll to the bottom of the configuration.mof file. Next, append all of the text within the configuration.mof tab in RegKeyToMof.

Note: For CM07 repeat the above process with the sms_def.mof tab and file. Once you have done that, you are done.
Copy text to Configuration.mof
Copy the agent setting mof text from the “to import in Admin/…” tab into a text file. I have called the one in my example, RCM.mof.
MOR setting for CM console import

Go to the Client Agent setting section in the CM12 console, and click Set Classes…
CM12 Console setttings

Click the Import… button.
Import Client settings mof
Select the RCM.mof file and click the Open button.
Oprn Mof file

Click on the Import button.
RegKeyToMof Import_Summary

Notice that the two classes are now imported and click OK.

CM12 Console setttings
Lastly, wait for clients to start reporting inventory. This will take up to twice the usual hardware inventory cycle before the newly inventoried regkeys will show up.

If you have any questions, please feel free to contact me @GarthMJ. Don’t forget that you can subscribe to my RRS feed to stay on top of the latest trips and tricks.