We help IT Professionals succeed at work.

How to clear & disable  all Windows event log categories in windows 10 with a single command.

Zacharia Kurian
Zacharia Kurian used Ask the Experts™
Under Windows 10/7 or any windows OS,  you open the Event Viewer to browse several categories. You can  clear a single category by clicking Clear Log... on the right pane and you can disable one of them if you want.

My question is, can we  clear & disable the entire Windows event log categories using a single command? I know that we can clear the entire logs using "wevtutil". But if some one knows how to clear and disable the complete category with a single command  that would be of a great help. I need a command that would clear & disable the entire  Microsoft-Windows categories, which has in alphabetical order of event categories. Seems to be  tricky?

Thank you,
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Dimitris MaleasData recovery engineer

You will wevtutil.exe in a script
for /f "delims=" %%a in ('WEVTUTIL EL') do WEVTUTIL SL "%%a" /e:false
Zacharia KurianAdministrator- Data Center & Network


could you possibly post a complete script?
Dimitris MaleasData recovery engineer

This is the script! Just copy/paste in cmd
Data recovery engineer
You have to run cmd as administrator
Mike TLeading Engineer


Alternatively open PowerShell as admin and run
Mike SunSenior Systems Engineer (IBM - retired)

Four methods summarised HERE