A repeatable mechanism for populating Configuration Manager with custom registry keys

Here are some of the immediate and obvious benefits:

– Extend Configuration Manager Inventory Definition once for custom registry value collection.

– Pin to the top of custom registry keys and immediately be able to recurse through all child keys. This is perfect for delegated environments.

– Allow different custom registry key inventory collections to different groups of devices and on different collection schedules.

An example of the finished solution is shown below:-

Registry - Final Result

A high level overview of the solution is listed below:-

1. The Configuration Item (script) is edited and the registry key paths are added / modified as required.

2. The Configuration baseline is assigned to a group of devices.

3. The baseline executes and stores all the registry values in a local WMI table

4. The WMI table is collected by hardware inventory and available for reporting / queries

The solution zip file contains 3 elements:-

  • The MOF File – See the MOF file import section below
  • The Baseline Cab – See the compliance baseline import section below
  • The script file – The raw VBScript code should any alterations be required

The zip file can be download here.

Please note:-

The script will collect all sub keys under the KEY_PATH and as such should the path be too shallow this will result in HINV (SCCM Inventory) failures because of inventory file sizes. Increases to the “Max MIF Size”Should be carefully considered and follow standard testing and change management processes.

Step 1 – MOF File Import

1. Under the Administration node. Modify the client settings, Hardware Inventory and select Set Classes.

registry.mofimport.1.ps

2. Select Import and choose the CM_RegistryValues.mof file from the zip above.

registry.mofimport.2.ps

3. Select the option to Import both hardware inventory classes and hardware inventory class settings.

registry.mofimport.3.ps

4. Once the import is complete you should see the Registry Values (CM_RegistryValues) class as below.

registry.mofimport.4.ps

Step 2 – Configuration Baseline Import

1. Under Assets and Compliance. Right click Configuration Items and Select Import. Select Add and browse for and select the Registry Values into WMI.cab file contained within the zip file above.

registry.confimport.1.ps

2. Once the import is completed. Right click the Registry Values into WMI Configuration Item and edit the Registry Values into WMI script.

registry.confimport.2.ps

3. Add any required Registry Keys Paths as per the examples and comments within the script. Please make sure you have read the warning above.

registry.confimport.3.ps

Step 3 – Deploy the Configuration Baseline

1. Right click the Registry Values into WMI Configuration Baseline and deploy this to a collection of your choosing.

registry.confdeploy.1.ps

Note: You should always trial anything new in the lab and ensure you check the contents of any files carefully.

Step Four – Baseline Evaluation and Hardware Inventory

1. During the next baseline and hardware inventory the registry values will be loaded into the SCCM Database. This can be monitored within the inventoryagent.log file.

registry.hinv.ps

Step Five – Importing the Registry Reports

Registry Collection Reporting

1. Please download the Reports here.

2. Follow this tutorial on how to perform the import.

Version Updates:-

  1. 26/01.2015 – Version 2.0 – Detect if a registry path goes directly to a setting and collect the value

License Information:-

Copyright 2015 Esebenza Limited. This program is distributed under the terms of the GNU General Public License.

Esebenza provides all tutorials, code and articles as is with no warranty or recourse to support. Should you experience any issues during deployment Esebenza can not be held liable.