Tuesday, April 22, 2014

Active Directory Query

Active Directory Query for Enabled user

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


Active Directory Query for Disabled User

(&(objectCategory=person)(objectClass=user)(!sAMAccountType=805306370)(userAccountControl:1.2.840.113556.1.4.803:=2))

Password Never Expire Users

(&(objectCategory=person)(objectClass=user)(!sAMAccountType=805306370)(userAccountControl:1.2.840.113556.1.4.803:=65536))

Open Active Directory Users and Computers
Right Click your Domain name and Click Find
Choose Custom Search
Click Advanced TAB, paste the code. Click Find Now.

No comments:

Post a Comment

 
span.fullpost {display:inline;}