User filter
How to filter users based on the criteria enabled or disabled
Active Directory Users and Computers
- Menu: “View”
- Select: “Filter Options…”
- Choose: “Create custom filter” and Click: “Customize…”
- Select tab: “Advanced”
- Write: “Enter LDAP query:” (text in the subsections below)
- Click: “OK”
- Click: “OK”
Enabled users
(!UserAccountControl:1.2.840.113556.1.4.803:=2)
Disabled users
UserAccountControl:1.2.840.113556.1.4.803:=2
Inspitarion for this guide took from here