Geeks With Blogs

News
Sal Sparacio's Blog .NET | c# | Computer Games | Windows Mobile | Solo IT / Programmer

I wanted a simple way to display all the locked out users on my domain. So I created this simple query to do so.

To use this::

1. Open Active Directory Users and Computer.
2. Right click on "Saved Queries"
3. Select " New " - > "Query"
4. Select " Define Query "
5. In the find box select " Custom Query ".
6. Select the " Advance " Tab.
7. Paste the following code in:

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

8. Give it a name and save the query.

All Done!


-- Sal

Posted on Wednesday, March 28, 2007 8:25 AM | Back to top


Comments on this post: View Locked Out Users - Query - Active Directory

# re: View Locked Out Users - Query - Active Directory
Requesting Gravatar...
Nice one
Left by Marisa on Oct 08, 2008 7:23 AM

# re: View Locked Out Users - Query - Active Directory
Requesting Gravatar...
dear Sir
this query is giving list of users including those who are not locked. what is the meaning of variable locktime >= 1
Left by h krishnan on Feb 19, 2009 12:42 AM

# re: View Locked Out Users - Query - Active Directory
Requesting Gravatar...
muchas gracias.
Left by ah on Jan 18, 2010 9:46 AM

# re: View Locked Out Users - Query - Active Directory
Requesting Gravatar...
How can query a list of expired users in AD?

Thanks
Left by Issa on Apr 04, 2011 1:49 PM

# re: View Locked Out Users - Query - Active Directory
Requesting Gravatar...
Sal, you're just stealing this from MS. Why not attribute it?
http://support.microsoft.com/kb/555131
Left by Dan on Oct 07, 2011 8:30 AM

Your comment:
 (will show your gravatar)


Copyright © Sal Sparacio | Powered by: GeeksWithBlogs.net