At first… Here is the default procedure to create a saved query:

– Open Active Directory Users and Computers.

– In the console tree, right-click Saved Queries.

– Point to New, and then click Query.

– In Name, type a query name.

– In Description, type a query description.

– Click Browse to define the container from which to begin your search.

– Click Define Query to define your query.

Here are the query definitions:

Locked Users:

(&(objectCategory=Person)(objectClass=User)(lockoutTime>=1))

Disabled users:

 (&(objectCategory=person)(objectClass=user)(!name=Gast)(objectCategory=person)(objectClass=user)(userAccountControl:1.2.840.113556.1.4.803:=2))