Thursday, March 22, 2012

ADUC: Create a custom LDAP Query


To create a custom Saved Query, follow these steps.

  1. Right-click Saved Queries and click the New-Query option
  2. Type in a name for your saved query, such as "Search"
  3. Click the Define Query button
  4. Under the Find drop-down list, select Custom Search
  5. Click the Advanced tab
  6. Type in your query
 

Some example for LDAP Queries:

Finds all disabled User Accounts

Finds all groups that have no members

Finds all locked out User Accounts

1 comment:

  1. Nice post

    Generate list (csv file output) for active users in AD

    csvde -d “ou=Users,DC=ABC,DC=net” -r “(&(objectCategory=person)(objectClass=user)(|(useraccountcontrol=512)(useraccountcontrol=66048)))” -L “sAMAccountName,givenName,sn,description,whenCreated” -f report_sno1.csv

    Change the event id for disabled user

    https://barchive.wordpress.com/2014/03/21/active-directory-audit-the-users/

    ReplyDelete