How to collect dynamic registry values using MOF

Gulbir Sekhon 21 Reputation points
2021-10-07T16:28:18.087+00:00

Hey all!

I am trying to build a report by collecting all registry values located under a particular registry key using SCCM MOF files. The issue I am facing is that we have a script that runs in our environment and from time to time it will create additional string values under the key in question. Is there a way I can use MOF to collect the new values without having to edit MOF code? I tried using the RegKeyToMof tool to no avail. I'm wondering if anyone else ran into this situation and can provide any guidance here?

Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
10,671 questions
Microsoft Configuration Manager
0 comments No comments
{count} votes

Accepted answer
  1. Garth Jones 1,656 Reputation points MVP
    2021-10-07T16:56:41.99+00:00

    Unless all keys have the exact same values, you will not be able to collect them via CM. if they are all exactly the same values then you can follow the add remove programs example.


1 additional answer

Sort by: Most helpful
  1. Amandayou-MSFT 11,046 Reputation points
    2021-10-08T08:40:00.37+00:00

    Hi @Gulbir Sekhon

    It may not collect dynamic registry values using MOF, the MOF code is edited by SCCM, if we change the code that has been written, it maybe cause confusion. If the values are static, we could run some query to achieve it.


    If the response is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments