DEV Community

terminalpuncher.com
terminalpuncher.com

Posted on

Get ALL Recent Events with this PowerShell One-Liner

Get ALL Recent Events with this PS One-Liner

Absolute Dust. Enjoy....

Get-WinEvent -ListLog * -EA silentlycontinue | where-object { $_.recordcount -AND $_.lastwritetime -gt [datetime]::today} | foreach-object { get-winevent -LogName $_.logname -MaxEvents 1 } | sort Timecreated | Format-Table TimeCreated, ID, ProviderName, Message -AutoSize Wrap 
Enter fullscreen mode Exit fullscreen mode

Top comments (0)