Created
September 30, 2022 01:18
-
-
Save jflyoo/043a22ebd1dd0757975469508fe76f83 to your computer and use it in GitHub Desktop.
CMD commands for various Windows event log tasks
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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