Here's a challenge question, I'm sure this can be done, the syntax is eluding me though.
I'm trying to grab the latest event log for a particular day.
My current syntax is as follows (throws an error on the convert, but you can see what I am trying to do):
$event = get-eventlog -logname $logName -source mpkLogParser -newest 1 | where {$_.TimeWritten -lt ([datetime]::ParseExact($DateTimeStart, "YYYY-MM-dd HH:mm:ss", $null))}
Any help would be appreciated,
Mark.
|