SQL query to get the registry key exists or not.

Manoj Anukonda 55 Reputation points
2024-02-14T21:43:18.7033333+00:00

Hello All, We are looking for a SQL query to get the data of all devices against the registry key exists or not. "HKLM\SOFTWARE\Microsoft\Office\ClickToRun\Configuration" is the path of the Registry and "VersionToReport" is the Registry Key. We need to have a query to find whether the key is present or not.

Microsoft Security | Intune | Configuration Manager | Other
0 comments No comments
{count} votes

Answer accepted by question author
  1. AllenLiu-MSFT 49,436 Reputation points Microsoft External Staff
    2024-02-15T01:41:11.9+00:00

    Hi, @Manoj Anukonda

    Thank you for posting in Microsoft Q&A forum.

    If you are using SCCM, it's very simple for us to query registry using CMPivot:

    https://www.prajwaldesai.com/query-registry-value-using-cmpivot/

    Here is an example how to list all machines that have not a specific registry key:

    https://www.systemcenterdudes.com/sccm-cmpivot-query/


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Add comment".


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.