Information :-

This will show you how to create a command line shortcut that will clear all of the Event Viewer logs in one click.

copy this script and paste in notepad and save as Clean Viewer.BAT

Right click, and click on Run as administrator to run the file

Code :-

@echo off FOR /F “tokens=1,2*” %%V IN (‘bcdedit’) DO SET adminTest=%%V IF (%adminTest%)==(Access) goto noAdmin for /F “tokens=*” %%G in (‘wevtutil.exe el’) DO (call :do_clear “%%G”) echo. echo goto theEnd :do_clear echo clearing %1 wevtutil.exe cl %1 goto :eof :noAdmin exit

Note :- Also you can download the Batch file from

https://www.sevenforums.com/attachments/tutorials/51536d1265072864-event-viewer-one-click-clear-win-7-viewer.zip

6 thoughts on “How to Clear Event Viewer with One Click in Windows”

Leave a Reply

Your email address will not be published. Required fields are marked *