DEV Community

terminalpuncher.com
terminalpuncher.com

Posted on

2 2

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)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay