Comments (18)

  1. Ed (DareDevil57) says:


  2. If you get RPC errors, in the first instance, update Get-WinEvent -ComputerName $PDC to Get-WinEvent -ComputerName $PDC.Name… after that, you’re on your own 😉

    1. Anonymous says:

      Thanks, This helped me so much after my account kept constantly locking out. This found the source of the issue and voila… all sorted now.

  3. Put it all on one line and then see if you get the same result…

  4. Anonymous says:

    Pingback from AD: Tracing the Source of Account Lockouts | MS Tech BLOG

  5. Brett Holden says:

    I've been looking for an easy way to do this for some time. This is spot-on, thanks

  6. Excellant and helped me to find the account lockout for DGM

  7. Mahesh Adate says:

    Dear Ian Farr,

    If possible, Please create a script file to download and execute.

  8. Joe says:

    Oh my god, just copy the content, paste it into notepad and save it.

    1. Andrew says:

      Should I just copy this as is and save it as a VBS?

  9. Greg D says:

    Tried to run this, but it just prints out ALL of the events form my PDC to the screen. Can't see anything relating to account lockouts or even related to the user account. Any ideas?

  10. Greg C says:

    Everything after "#Collect lockout events for user from last hour" is a single line

  11. Vinny says:

    What if we need to check before 15 to 20 days

  12. jbruns2010 says:

    Not only do we need machine, but what process on that machine. If it’s not obvious, it can be very hard to know.

  13. jbruns2010 says:

    We used to be able to use ALockout.dll in 2003 but it no longer works in 2008 and up.

  14. sreenivasa sarma says:

    my traces account is locked how to lockout

  15. Andy says:

    Hi, this script is brilliant thank you but it runs incredibly slow, does anybody else experience this or is it something I can remedy?