JSI Tip 9913. ADFind.exe freeware can use :AND: and :OR: instead of :1.2.840.113556.1.4.803: and :1.2.840.113556.1.4.804: to define a bitwise filter.


The new version of ADFind.exe freeware defines:

Switch           D e s c r i p t i o n
-bit             Bitwise operator filter conversion enable
                 :AND:= converts to :1.2.840.113556.1.4.803:=
                 :OR:= converts to :1.2.840.113556.1.4.804:=
Using ADFcsv.cf, which contains the -bit switch, we can run:
adfind -ef c:\util\ADFcsv.cf -f "&(objectcategory=Person)(objectClass=User)(!userAccountControl:AND:=2)"  sAMAccountName distinguishedName userPrincipalName MemberOf userAccountControl lastLogon 
instead of
adfind -ef c:\util\ADFcsv.cf -f "&(objectcategory=Person)(objectClass=User)(!userAccountControl:1.2.840.113556.1.4.803:=2)" sAMAccountName distinguishedName userPrincipalName MemberOf userAccountControl lastLogon
The output might look like:
"sAMAccountName";"distinguishedName";"userPrincipalName";"MemberOf";"userAccountControl";"lastLogon"
"Test";"CN=Test.User,CN=Users,DC=JSIINC,DC=COM";"[email protected]";"CN=Accounts Payables,CN=Users,DC=JSIINC,DC=COM#CN=accountants,CN=Users,DC=JSIINC,DC=COM";"66048 \[NORMAL_USER(512);NO_EXPIRE(65536)\]";"2005/11/15-23:55:00 Eastern Standard Time"
NOTE: See the following tips:
How can I save and recall the switches I use with ADFind.exe freeware?

How can I use environment variables to define commonly used ADFind.exe freeware switches?

ADFind.exe freeware allows you to save and recall query filters.



Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish