Windows

Clear Windows Event Log and Reliability History Command Line

May 2, 2022 Rich 1 min read

Clear all the Windows Event Logs, resetting reliability history, from the command line.

Command Line Method

for /F "tokens=*" %1 in ('wevtutil.exe el') do wevtutil.exe cl "%1"

Batch Script Method

@echo off
for /F "tokens=*" %%E in ('wevtutil.exe el') do wevtutil.exe cl "%%E"

Powershell Method

wevtutil el | Foreach-Object {Write-Host "Clearing $_"; wevtutil cl "$_"}

Leave a comment