I'd like to find if a single Group policy setting has been applied on a specific domain / AD server.
In the simple case of modifying the the default group policy I can look up the policy setting via:
- the registry (local or remote using WMI)
- using the WMI class RSOP_PolicySetting in the ROOT\RSOP\Computer namespace. However, this only appears to give me the group policy setting for the machine you are connecting to with WMI.
However, imagine a AD configuration with multiple OU's with custom policies on each OU. For instance, Say the OU hierarchy is:
- Employees
- Marketing
- Engineers
- Drones
How do I get look across all 4 OU's to see if the correct policy is applied everywhere? I'd like to make a single query to the AD server to figure this information out.
I suppose an alternative solution would be to find all the OU's, pick a sample computer from each OU, and query it for the correct policy. Hopefully there is a better solution :)