Batch – Clear Windows Logs
FOR /F “tokens=*” %1 in (‘wevtutil.exe el’) DO wevtutil.exe cl “%1” exit /b 0 Notes Clear events after saving log: wevtutil cl Application /bu:C:\backup\back.evtx Return names of logs: wevtutil el Status of log: wevtutil gli Application All Options wevtutil [{el | enum-logs}] [{gl | get-log} <Logname> [/f:<Format>]] [{sl | set-log} <Logname> [/e:<Enabled>] [/i:<Isolation>] Read More …