Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 355
  • Last Modified:

automatically search all locked out IDs

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
howruaz9
Asked:
howruaz9
  • 2
  • 2
2 Solutions
 
KenMcFCommented:
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
 
howruaz9Author Commented:

Thanks very much KenMcF, I will try it.

Is it possible to use directory service command line to do this job?
0
 
KenMcFCommented:
You can but it is harder. Take a look at this thread

http://powershell.com/cs/forums/p/268/318.aspx
0
 
howruaz9Author Commented:
Many thanks KenMcF, I really appreciate your help.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now