Solved

automatically search all locked out IDs

Posted on 2010-11-20
4
347 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

[b]Ok so now I will show you how to add a user name to the description at login. [/b] First connect to your DC (Domain Controller / Active Directory Server) SET PERMISSIONS FOR SCRIPT TO UPDATE COMPUTER DESCRIPTION TO USERNAME 1. Open Active …
Find out how to use Active Directory data for email signature management in Microsoft Exchange and Office 365.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

792 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