wevtutil el # List the system logs
wevtutil qe Security /c:5 # Show the last 5 results for the 'Security' provider
wevtutil qe Security /q:*/System/EventID=4624 /c:10 # show the last 10 security logon events
wevtutil qe Security /q:*/System/EventID=4648 /rd:true /f:text /c:1 # show the most recent local logon
wevtutil.exe <command> /? will show detailed help for a subcommand.
For example, Wevtutil.exe qe /?
Enter the wevtutil.exe in cmd.exe, you will get its switches with explanation.
el meaning enumerate logs
qe meaning query events
/q query; Xpath query, if you don’t specify /c, then all events will be returned.
/c Sets the maximum number of events to read.
/rd (reverse direction) if true, most recent events will return
/f format which is text or xml etc.
Avi
Comments
Post a Comment