Reading Local Group Policy / Active Directory Settings

Posted by Shinobi on Stack Overflow See other posts from Stack Overflow or by Shinobi
Published on 2009-09-30T23:41:11Z Indexed on 2010/06/02 1:53 UTC
Read the original article Hit count: 498

Filed under:
|
|
|

I'm writing a C# program that will enforce password complexity in accordance with the Windows Group Policy setting "Password must meet complexity requirements". Specifically, if that policy is set to Enabled either on the local machine (if it's not part of a domain) or by the Domain Security Policy (for domain members), then my software needs to enforce a complex password for its own internal security.

The issue is that I can't figure out how to read that GPO setting. Google searches have indicated that I can read GPO settings with one of these two APIs: the System.DirectoryServices library in .NET Framework, and Windows Management Instrumentation (WMI), but I haven't had any success so far.

Any insights would be helpful.

© Stack Overflow or respective owner

Related posts about c#

Related posts about .NET