Skip to content

Instantly share code, notes, and snippets.

@jflyoo
Created September 30, 2022 01:18
Show Gist options
  • Save jflyoo/043a22ebd1dd0757975469508fe76f83 to your computer and use it in GitHub Desktop.
Save jflyoo/043a22ebd1dd0757975469508fe76f83 to your computer and use it in GitHub Desktop.
CMD commands for various Windows event log tasks
REM Get a list of all the Windows logs
wevtutil el | findstr /i system
REM Export a log in XML format
REM Note: the exported logs won't have a root tag; you may need to add one if you plan on parsing with python
wevtutil qe System > c:\users\dev\EvtLog-System.xml
REM Backup events and clear the log
wevtutil cl System /bu:c:\users\dev\EvtLog-Date-System.evtx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment