Question

I am trying to retrieve a group policy from a Windows Server 2008 Active Directory and change the minimum password age, maximum password age, and minimum password length in a C# application.

Is there a way to do this? So far I have only found out how to create new Group Policy objects using Interop.GPMGMTLib (gpmgmt.dll), yet I haven't figured out how to change the policy's password rules and I am not sure if there is an easier way.

Was it helpful?

Solution

I believe that you can use DirectoryEntries of c# to change those Values. this is a gud reference http://www.codeproject.com/Articles/18102/Howto-Almost-Everything-In-Active-Directory-via-C . Also check for msdn references.

OTHER TIPS

I realize this is an old post, but have a look at using Windows Power Shell and Group Policy cmdlets.

http://technet.microsoft.com/en-us/library/dd759177.aspx

I haven't used Power Shell for Group Policy yet but I use it frequently to keep our payroll system and Exchange server in sync.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top