Answered by:
How do I query in SCCM for a particular value of a particular registry key?

Question
-
Say some number of machines on my network have the Registry Key:
HKEY_LOCAL_MACHINE\SOFTWARE\MySoftware\Support
And a value of:
BLAH = "whatever"
I want to write a query for the machines that have BLAH and it is set to "whatever", does someone know how to do this? Also while I would greatly appreciate
the actual SQL query, it would also be very helpful to know the steps to go through in the Query Wizard. Thanks for any helpful replies.
Friday, March 15, 2013 2:29 PM
Answers
-
CM07 know nothing about registry keys, therefore you must extend CM07 to collection this data.
To do this, you need to edit your sms_def.mof / configruaiton.mof. Once you extend the sms_def.mof / configruaiton.mof, your clients will start reporting this data to your CM07 site.
The easiest way to create the mof edits you need by using a program called RegKeyToMOF, then you append those edit to the appropriate file.
http://myitforum.com/cs2/files/folders/proddocs/entry152945.aspx
http://www.enhansoft.com/
- Proposed as answer by Jörgen NilssonMVP Friday, March 15, 2013 2:43 PM
- Marked as answer by MrEMeat Friday, March 15, 2013 5:51 PM
Friday, March 15, 2013 2:35 PM
All replies
-
CM07 know nothing about registry keys, therefore you must extend CM07 to collection this data.
To do this, you need to edit your sms_def.mof / configruaiton.mof. Once you extend the sms_def.mof / configruaiton.mof, your clients will start reporting this data to your CM07 site.
The easiest way to create the mof edits you need by using a program called RegKeyToMOF, then you append those edit to the appropriate file.
http://myitforum.com/cs2/files/folders/proddocs/entry152945.aspx
http://www.enhansoft.com/
- Proposed as answer by Jörgen NilssonMVP Friday, March 15, 2013 2:43 PM
- Marked as answer by MrEMeat Friday, March 15, 2013 5:51 PM
Friday, March 15, 2013 2:35 PM -
Great, I guess I was confused because you can set a configuration item under Desired Configuration Managment to check tvalue of Registry Keys. I will look into
your suggestion. Thanks for your response.
Friday, March 15, 2013 2:43 PM -
I am assuming that the .mof files are something that the SCCM server itself uses? As those are not files that I have on my local PC. I do
not have access to the server it self, I only have limited access through the console.
Friday, March 15, 2013 5:32 PM -
Correct, the mof files are on the site server itself and they must be changed on each primary site server.
http://www.enhansoft.com/
Friday, March 15, 2013 5:40 PM -
BTW why not look at DCM for this? How many values does "BLAH" have?
http://www.enhansoft.com/
- Edited by Garth JonesMVP Friday, March 15, 2013 8:23 PM typo.
Friday, March 15, 2013 6:01 PM -
DCM is possible choice, but it depends on what you what you. DCM doesn't actually return the value of a registry value it simply compares the value to a baseline value and returns whether or not it matches. This may or may not be food enough depending upon the question you are asking. Also note registry "keys" don't have a value but may contain values; i.e., registry keys are containers, the "folders" you see in the tree in regedit. The items you see on the right in regedit are values.
Jason | http://blog.configmgrftw.com
Friday, March 15, 2013 8:02 PM -
I actually started out trying to use DCM as I wanted to see only machines that had BLAH but BLAH was not equal to a certain value.
If a machine does not have BLAH then I don't care about it. But if it does have BLAH then I want it to be a certain value. I couldn't
figure it out, I always had every machine show up as compliant even if I knew it wasn't compliant.
Friday, March 15, 2013 8:11 PM -
So you can still use DCM for this you just might need to get creative on how you do it.
- - You should be able to create a CI from everyone that have BLAH and if the Reg key for BLAH = 1 (or whatever you want)
- - You then can create a CI for everyone that doesn’t have BLAH key and make the complaint
- - Finally you create a report show you everyone that is not complaint for item 1 and is NOT in item 2.
Or you could write this as a VBS script.
http://www.enhansoft.com/
Saturday, March 16, 2013 2:31 PM