Use PowerShell to Lock Out Active Directory Users

In this article I’ll show you how to check who have a locked out status in the Active Directory. First we want to check which users have a locked status. In the script below I’ll show you how to accomplish this task.

Set locked out status for users in a specific OU

For testing purposes I used a script from Mike F Robbins to give users in a specific OU the status locked out.

Search for users with a Locked Out status

Result:

Locked Source

Now we need check the PDC server name and get events with ID 4740 from the security log to find the locked out source for each user.

Result:

Full PowerShell script

Thank you for spending some time at my site and in my blog. I hope you come to visit again soon 😉

About Lex van der Horst 201 Articles
Techwire

Be the first to comment

Leave a Reply