Saturday, December 10, 2016

SCCM Configuration.MOF for Outlook Add-ins Inventory

Extending Hardware Inventory in SCCM can seem like a daunting task but it can be extremely easy.  We are going to look at running a custom inventory against Microsoft Outlook Add-ins.  This is probably a common scenario that you very well might find yourself in right now to determine what add-ins might cause an issue with you upgrading Outlook 2010 to 2016 (or so on).

The first thing we need to do is grab the extremely handy utility by Microsoft MVP Mark Cochrane.  The utility is "RegKeyToMof" and can save you time from dealing with syntax errors.  Its a standalone utility also, no installation required.  It can be found on Microsoft's Technet site here:

Once you have "RegKeyToMof" go ahead and launch it.

Once launched we need to browse to the location in the registry where the Outlook Add-ins are stored.  This can be found under "HKLM\Software\Microsoft\Office\Outlook\Addins".  Inside the "RegKeyToMof" application we will click our way through to that path.

Next we will enter in a name for "Group" and "ClassName".  Since we are only dealing with a 32-bit version of Outlook we will uncheck the box labeled "Enable 64bits (for Regkeys not written in Wow6432Node)".  We will also check the box labeled "Dynamic instances (Only takes fields found in the first child)".

You'll notice on the bottom pane under the tab "ConfMgr12" and "configuration.mof" that the required syntax for extending the "MOF" is supplied.  Highlight all, right click, and select copy.

We are going to browse to the directory where the "Configuration.MOF" is stored.  Navigate to your Primary (or CAS) site server installation directory to "inboxes\clifiles.src\hinv".  You will now make a copy of your "Configuration.MOF" file, its always a good idea to have a backup before we start making changes.  Now that you have a copy of the "MOF" you will edit the original "Configuration.MOF" in a text editor of your choice.  Scroll down to the bottom of the file until you see lines reading "Added extensions start" and "Added extensions end".

In between the "Added extensions start" and "Added extensions end" we will paste in the code we copied earlier.  It should look similar to the image below.  Save the changes and close.

Now, going back to the "RegKeyToMof" application, still under the "ConfMgr12" tab we will switch to the secondary tab under it labeled "to import in Admin/AgentSettings/HardwareInventory/SetClasses/Import".  The title should give you a clue what we'll be doing with this.  Highlight all and right-click copy once more.

We will now create a new text file labeled "OutlookAddins.MOF" and save it in the same directory as the "Configuration.MOF".  Inside this new text file paste the code from earlier and save the changes.  It should look something like this.

Now lets open the SCCM Administrative Console.  We are going to "Administration - Overview - Client Settings" and from here right click the "Default Client Settings" and go to "Properties".  Inside this new window go to "Hardware Inventory" and then click on "Set Classes..."

Here we will select the option "Import".

Now browse to the directory that you stored the "OutlookAddins.MOF" we created earlier.  You will then be at the "Import Summary" screen.  Ensure the option "Import both hardware inventory classes and hardware inventory class settings" is selected.  You should also notice a nice green check mark, no syntax errors and ready to import.  Thank you "RegKeyToMof".

Click on "Import".  You will be brought back to the "Hardware Inventory Classes" screen where you can check or uncheck the boxes for your new custom inventory class.  You can OK out of this screen to bring you back to the SCCM Admin Console.

You can also browse to the logs directory on your site server and view the log "dataldr.log" to ensure your custom inventory imported successfully.

Now when your machines check in for their usual inventory it will also gather this information that you can view in "Resource Explorer".  In another article we will look at SQL queries and SSRS reports to better view this data.

No comments:

Post a Comment