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™
on
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,
Comment
Watch Question

Do more with

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

Commented:
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

Author

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

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

Commented:
Hi,

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

Commented:
Four methods summarised HERE