Locked out active directory accounts are a constant problem (that I will discuss in a later post) where I work. But from a users perspective they could be having a problem with "getting to the internet", "wifi", "email", or even "printing". All these services we provide hinge on their active directory account being in good working order.
So instead of manually searching for a users account these days I just use a powershell script to check if ANY accounts on the domain are locked out. At this point I just keep a powershell window open and hit Up Arrow and Enter to execute the script again.
Open up notepad or your text editor of choice and type the following:
Search-ADAccount -LockedOut | FT Name, ObjectClass, UserPrincipalName
Save this text file as lockedout.ps1
Now just open powershell and run your script!
Post a Comment