Friday, August 16, 2013

Get a list of locked out account in AD using Powershell

When you need to get a list of all locked out account in Active Directory, you can use this script

Get-ADUser -Properties lockoutTime -Filter {lockoutTime -gt 50000} | select name,lockoutTime

And to unlock all the locked account you can use this command

Get-ADUser -Properties lockoutTime -Filter {lockoutTime -gt 50000} | Unlock-ADAccount


Easy yeaa !!

1 comment:

Anonymous said...

Hello, just wanted to say, I enjoyed this post. It was practical.
Keep on posting!