When you compose an LDAP (Lightweight Directory Access Protocol) query, or a DSQUERY query, or an Adfind.exe query, you can filter your query based upon the values of attributes that you specify, like (postalCode=30004).
If you wanted to filter postalCode for being not entered, you would use (!postalCode=*), where ! is NOT EQUAL.
If you wanted to returned the distinguished name, city, state, and postal code of all users that have had no state and/or postal code entered, in CSV format, you could use:
adfind -default -nodn -csv -csvdelim ";" -nocsvheader -f "&(objectCategory=person)(objectClass=user)(|(!st=*)(!postalcode=*))" distinguishedName l st postalcodeNOTE: See How can I filter an Active Directory query by testing an attribute to be this OR that?
NOTE: See What operators can I use when filtering an Active Directory query?
NOTE: See How can I filter an Active Directory query using a bitwise flag?
0 comments
Hide comments