Is there a way to return a list of Active Directory login attempts using C#? For example, I would like to somehow return a list that contains the following
- DC Name
- User State
- Bad Pwd Count
- Last Bad Pwd
- PWD Last Set
- Lockout Time
Essentially, I would like to know which device that is accessing Active Directory is causing a password lockout, on password updates.
I have looked at using the
UserPrincipal class in
System.DirectoryServices.AccountManagement but I cannot find a method that allows one to aggregate across DCs.
Thanks in advance for any help or advice!