September 25th, 2015

PowerTip: Use PowerShell to Get Events for Specific Day

Doctor Scripto
Scripter

Summary: Use Windows PowerShell to get event log events that occur on a specific day.

Hey, Scripting Guy! Question How can I use Windows PowerShell to get application event log events that occur only on Sept. 24, 2015?

Hey, Scripting Guy! Answer Use the Get-EventLog cmdlet and specify the log name and the before and the after dates, for example:

Get-EventLog -LogName application -After "9/24/15" -Before "9/25/15"

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.

Feedback