开发者

How to retrieve group-policy settings programatically?

开发者_StackOverflow中文版Microsoft deliveres a nice COM enabled DLL named GPMGMTlib (GPMC API) to manage GPOs in an Active Directory. This library exports an interface called IGPMGPO, which represents a GPO and can do all sorts of stuff, like settings permissions, exporting and importing.

Sadly, if I understood the reference on MSDN correctly, the interfaces provide no way to retrive the settings which are currently set for a GPO programatically, so I am a little uncertian if GPMGTMT is the way to go.

Here goes my question:

  • How can I access (read-only is completely sufficient) the policy settings of a specific GPO in a domain programatically? Solutions using C# or another .NET language are preferred.

Annotation:

I need this to automatically compare the GPOs of two domains in a forest, which are slightly different. I also tried exporting the GPO to an XML report and using a diff-tool, but this is way to time consuming, since there are about ten domains in the forest which are going to have to be compared during the next months multiple times.


Do you know a product named Advanced Group Policy Management (AGPM) which is distributed in Microsoft Desktop Optimisation Pack (MDOP)? And that it includes the capability of managing and comparing GPOs.


You've also got Group Policy Management Console Class Library To play with an assembly in spite of playing with a COM object, but I'm not sure that it's better.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜