Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Powershell Get-Eventlog Filter by Time

Tags:

powershell

I'm running Windows 2003 and I want to get a list of events at a specific time...after 12:06 pm. How can I get only those events at that time? I've tried this:

powershell get-eventlog application -after "3/15/2013 12:06:00 pm"

but I'm getting an error:

Cannot bind parameter 'InstanceId.... 
like image 993
Ken J Avatar asked Dec 20 '22 08:12

Ken J


1 Answers

this works:

 powershell -command  "get-eventlog application -after ([datetime]'3/15/2013 12:06:00 pm')"
like image 191
CB. Avatar answered Jan 14 '23 19:01

CB.