I use a filter for search a list of user in Active Directory...
Here is my filter example:
AD.filterung = "(&(objectClass=user)(objectCategory=user)(userAccountControl:1.2.840.113556.1.4.803:=2)(sn=)(|(telephoneNumber=)(mail=))(l=" + Werk + ")(cn=))";
It show me all user with UF_ACCOUNT_DISABLE but i want show all other User the not Unlock ...how I build a not operator in my filter. :(
have you tried simply with "!" ?
AD.filterung = "(&(objectClass=user)(objectCategory=user)(!userAccountControl:1.2.840.113556.1.4.803:=2)(sn=)(|(telephoneNumber=)(mail=))(l=" + Werk + ")(cn=))";