Reputation: 23571
I'm trying to use ldapsearch
command to search for accounts with DONT_EXPIRE_PASSWD
flag set:
Since LDAP query syntax does not support binary AND op, what should I use on userAccountControl
property?
I can't use Get-AdUser
PowerShell commandlet, I need an LDAP query.
Upvotes: 2
Views: 964
Reputation: 23571
LDAP does support a binary AND operation, e. g.:
(&(objectCategory=Person)(UserAccountControl:1.2.840.113556.1.4.803:=65536))
Where 1.2.840.113556.1.4.803
, also known as the LDAP_MATCHING_RULE_BIT_AND, is the binary AND operation.
Upvotes: 1