Trying to generate a list of all warnings and errors within a specified time and dates


i trying generate errors , warnings specific time , date specific time , date, kind of stuck... got far, not seem work... can help?

get-winevent application | where-object {$_.datetime -gt "2/25/2014 6:00:00 am"} | ?{$_.leveldisplayname -eq "error" -or $_.leveldisplayname -eq "warning"}

hi gramelot,

to filter event log, can try parameter -filterhashtable, like:

get-winevent -filterhashtable @{logname='application';id=4107;starttime="1/15/11";endtime="1/17/11"}

for more detailed information, please refer article:

use powershell cmdlet filter event log easy parsing

i hope helps.



Windows Server  >  Windows PowerShell



Comments

Popular posts from this blog

Motherboard replacement

Cannot create Full Text Search catalog after upgrading to V12 - Database is not fully started up or it is not in an ONLINE state

Remote Desktop App - Error 0x207 or 0x607