When the Audit User Account Management policy is enabled, user administration activities are logged in the Security logs. For user account actions, Event ID 4722 is logged when a user account is enabled, and Event ID 4725 is logged when an account is disabled. These logs contain key details about the events, such as who performed the action, when it occurred, and from which machine to help admins track account changes effectively.
- Open Event Viewer on a domain controller and navigate to Windows Logs»Security.
- In the right pane, click Filter Current Log.
- Search for Event IDs 4722 (account enabled) or 4725 (account disabled) to review related user account events.
You can use the below PowerShell cmdlets to filter event logs based on user accounts. Replace the <SAMAccountName> with the specific username for which you’re auditing, in the following events:
Event ID 4722: User account enabled
Get-WinEvent -FilterHashtable @{LogName='Security'; Id=4722} | Where-Object { $_.Message -match "Target Account:\s+Security ID:\s+[^\r\n]+\s+Account Name:\s+<SAMAccountName>" } | Select-Object TimeCreated, Message | fl
Event ID 4725: User account disabled
Get-WinEvent -FilterHashtable @{LogName='Security'; Id=4725} | Where-Object { $_.Message -match "Target Account:\s+Security ID:\s+[^\r\n]+\s+Account Name:\s+<SAMAccountName>" } | Select-Object TimeCreated, Message | fl
To narrow results further, you can filter the logs by the ‘TimeCreated’ attribute based on your requirements to focus on events within a specific timeframe.
Note: Both methods must be performed on the domain controller where the enable or disable action occurred. If your Active Directory has multiple domain controllers, auditing becomes more complex as you need to search for events on each one.
Simplify tracking of disabled or enabled AD accounts without the inconvenience of switching between multiple domain controllers!
- With AdminDroid, you can eliminate this complexity by collecting and filtering audit data from all domain controllers and other computers in a single place.
- The enabled user events and disabled user events reports track audit events for enabled and disabled accounts in Active Directory with details including, time, action performer, and event location.