Solved

automatically search all locked out IDs

Posted on 2010-11-20
4
345 Views
Last Modified: 2012-05-10
I have a list of thousands ID name and need to find all locked out IDs. I can manually check them in AD. Is there any way to search them automatically using directory service command line?

Thanks in advance
0
Comment
Question by:howruaz9
  • 2
  • 2
4 Comments
 
LVL 27

Accepted Solution

by:
KenMcF earned 500 total points
ID: 34180858
I would use powershell and the quest AD cmdlets

http://www.quest.com/powershell/activeroles-server.aspx

$users = get-content c:\user.txt
foreach ($user in $users){
$u = get-qaduser $user
if ($u.AccountIsLockedOut -eq "True"){
write-host "User Account $user is locked"
}}

of for all users in AD and export to csv file

get-qaduser -sizelimit 0 | where{$_.AccountIsLockedOut -eq "True"} | select Name | export-csv c:\lockedusers.csv
0
 

Author Comment

by:howruaz9
ID: 34181282

Thanks very much KenMcF, I will try it.

Is it possible to use directory service command line to do this job?
0
 
LVL 27

Assisted Solution

by:KenMcF
KenMcF earned 500 total points
ID: 34181303
You can but it is harder. Take a look at this thread

http://powershell.com/cs/forums/p/268/318.aspx
0
 

Author Closing Comment

by:howruaz9
ID: 34181716
Many thanks KenMcF, I really appreciate your help.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

This is my first article in EE and english is not my mother tongue so any comments you have or any corrections you would like to make, please feel free to speak up :) For those of you working with AD, you already are very familiar with the classi…
Introduction You may have a need to setup a group of users to allow local administrative access on workstations.  In a domain environment this can easily be achieved with Restricted Groups and Group Policies. This article will demonstrate how to…
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles from a Windows Server 2008 domain controller to a Windows Server 2012 domain controlle…
This tutorial will walk an individual through the process of configuring their Windows Server 2012 domain controller to synchronize its time with a trusted, external resource. Use Google, Bing, or other preferred search engine to locate trusted NTP …

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now