Files
windows-scripts/ClearAllEventViewerLogs.bat
2023-12-05 19:39:38 -06:00

16 lines
248 B
Batchfile
Executable File

@echo off
rem IF /I "%EVENTVIEWER%" NEQ "Y" GOTO END
for /F "tokens=*" %%G in ('wevtutil.exe el') DO (call :do_clear "%%G")
echo.
echo All Event Logs have been cleared!
goto end
:do_clear
echo clearing %1
wevtutil.exe cl %1
goto :eof
:end
pause