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 !!

2 comments:

Anonymous said...

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

Anonymous said...

You could definitely see your skills within the article
you write. The sector hopes for more passionate writers such as you who are not afraid to say how they believe.
At all times follow your heart.