alejandro-g
5/23/2017 - 8:38 PM

Get event logs messages by date and error prefix. (replace "<< >>" with desired criterias)

Get event logs messages by date and error prefix. (replace "<< >>" with desired criterias)

get-winevent -FilterHashtable @{logname='<<log-name>>'} | 
   where {$_.Message -like "*<<message>>*" 
          -and $_.TimeCreated.tostring("dd/MM/yyyy") -eq "04/05/2017" } | 
    %{ echo "error: $($_.TimeCreated)" $_.Message }