Windows Security Log is a PowerShell tool that displays event IDs 4624 and 4625
ID 4624 - successful logon attempts
ID 4625 - failed logon attempts
The information displayed shows a 1000 of the newest security logs
Run PowerShell as administrator
Then run the following commands
cd "C:\path\to\your\folder"
dir
.\Winsoc.ps1
ProviderName: Microsoft-Windows-Security-Auditing
TimeCreated Id LevelDisplayName Message
----------- -- ---------------- -------
01/12/2026 00:00:00 4624 Information An account was successfully logged on.…
01/12/2026 00:00:00 4625 Information An account failed to log on.…
Note: The example shows 2 but it will show 1000, the purpose of this exaple is to show you want the differents is between looking for event ID 4624 and 4625
- Windows 10 or 11
- Administrator permissions
The Get-WinEvent document states it works with Windows Vista and later Windows operating systems. However, the oldest version of Windows the author has access to for testing purposes is Windows 10 (64-bit).
The following operating systems have not been tested:
- Windows Vista
- Windows 7
- Windows 8
- Windows 8.1
Microsoft - Get-WinEvent - https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.diagnostics/get-winevent?view=powershell-7.7
Microsoft - Creating Get-WinEvent queries with FilterHashtable - https://learn.microsoft.com/en-us/powershell/scripting/samples/creating-get-winevent-queries-with-filterhashtable?view=powershell-7.7