I am trying to trace back where a certain policy value was set. So I can change it. For example, when I run in the user session
GPResult /v /r
I get this output:
Administrative Templates
-------------------------
<snip>
GPO: MyCompany - RDS User Policy
Folder Id: Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoDrives
Value: 1, 0, 0, 0
State: Enabled
<snip>
When I edit the policy "RDS User Policy" in Group Policy Management Editor, I expect to find this setting somewhere.
Most likely in the tree User Configuration -> Policies -> Admimistrative templates. Now it seems that there are a few hundred active settings, but no one remotely matches this Folder ID.
How do I match this folder ID to a policy setting which I can edit and change?
Backtracing this requires some knowledge and experience of how Group Policies are structured, but fortunately there is an easier way.
First of all, the hard(er) way.
Registry entries typically tend to be documented, and one way of locating the documentation for them is to search for the entry online using your favourite search engine. In this case, I searched for
Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoDrives
and it brought me to this page: Hide physical drives in Windows Explorer.Here, it notes:
This, again, is also typical of registry entries under the "Policies" node: these correspond to Group Policy settings.
Now, having experience of Group Policies, I know that a setting such as this is typically under Windows Components > File Explorer, and looking there I see one named "Hide these specified drives in My Computer".
Again, I search for that setting and I find Using Group Policy Objects to hide specified drives, which confirms that it is indeed the policy I want.
This is all well and good, but what if there's another that isn't so obvious or easy to find? This is where the easier way comes in.
In most cases, running gpresult from the client PC is actually not the most efficient way of collecting this information. Instead, in the Group Policy Management Console, using the "Group Policy Results" feature to collect resultant set of policy information is preferable. This integrates properly with the .admx and .adml files in your Group Policy Central Store to pull in all of the display names, you can drill down into the details and pull out a lot of useful information. True, it's nothing that you can't also do with the command-line tool, but it just presents everything in a much more usable manner.
From the context of your comment on the question, you would seem to prefer to be able to search a plain text file, and those plain text files do also exist; they're in your Sysvol share, under Policies\PolicyDefinitions, but they're neither the ideal nor optimal way of finding this information.