July 30th, 2015

PowerTip: Find Most Recent Event Log Entry

Doctor Scripto
Scripter

Summary: Use Windows PowerShell to find the most recent event log entry.

Hey, Scripting Guy! Question How can I use Windows PowerShell to see the most recent event log entry from my application log?

Hey, Scripting Guy! Answer Use the Get-EventLog cmdlet and select the application log and the Newest 1 entry:

Get-EventLog application -Newest 1

Author

The "Scripting Guys" is a historical title passed from scripter to scripter. The current revision has morphed into our good friend Doctor Scripto who has been with us since the very beginning.

0 comments

Discussion are closed.