API Reference
Class
GroupFilterParser
Parses an RSAT-like filter expression for groups and converts it to an LDAP filter. Supported fields include Name, SamAccountName, CN, DistinguishedName, DisplayName, ManagedBy, Description, MemberOf, GroupScope (Global|DomainLocal|Universal), GroupType (Security|Distribution), Security/Distribution booleans, and WhenCreated/WhenChanged dates. Supported operators: -like (wildcards *), -eq, -ne for strings/booleans and -gt/-ge/-lt/-le/-eq/-ne for dates. Parentheses are supported with precedence (-and over -or).
Inheritance
- Object
- GroupFilterParser
Methods
TryParseToLdap 2 overloads
public static Boolean TryParseToLdap(String expression, out String ldapFilter) #Returns:
BooleanAttempts to parse an RSAT-like expression (with optional parentheses) to an LDAP filter string.
Parameters
- expression System.String
- ldapFilter System.String@
public static Boolean TryParseToLdap(String expression, out String ldapFilter, out String error) #Returns:
BooleanAttempts to parse an RSAT-like expression and also returns a parse error message when it fails.
Parameters
- expression System.String
- ldapFilter System.String@
- error System.String@