Clear Windows Event Log and Reliability History Command Line

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 "$_"}

Published by

Rich

Just another IT guy.

Leave a Reply

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