While Event Viewer is a tool that can be incredibly useful for examining all the events that take place in a computer, you may at times want to quickly clear all event viewer logs on your clients’ devices.
If the Windows Event Viewer is so important, why delete event viewer logs? Well, there are several reasons; one of which being that when accessing the event log file, anyone can see your private information. Therefore, if you wish to protect your clients’ privacy when it comes to everything that they’ve ever done on their computer, then deleting the event log every now and again is a great idea.
Well, we’re here to make your life just a tad easier by bringing you this easy-to-use script to clear all event logs in Windows!
This script clears all Windows event logs, permanently deleting everything you see in Event Viewer (eventvwr.exe), including System, Setup, Security, and all Applications.
It’s really important to note that with this script, every level will be deleted, and no backup will be made. If this seems like it may be problematic for you, please make sure to create a restore point just in case something goes wrong.
@echo off for /F %%a IN (?wevtutil el?) DO (wevtutil.exe cl %%a >nul 2>&1) IF (%adminTest%)==(Access) goto noAdmin for /F "tokens=*" %%G in ('wevtutil.exe el') DO (call :do_clear "%%G") echo. echo Event Logs have been cleared! goto theEnd :do_clear echo clearing %1 wevtutil.exe cl %1 goto :eof :noAdmin echo You must run this script as an Administrator! echo. :theEnd
How can I delete all Windows Event Viewer (eventvwr.exe) logs?
With our handy-dandy script, deleting all Windows Event Viewer logs is super easy! Try it out for yourself, and let us know what you think.
How can I quickly batch clear all Event Viewer logs?
Well we have a script just for that, which permanently deletes everything you see in Event Viewer (eventvwr.exe) in seconds.
How can I programmatically clear all Event Viewer logs?
With our script here, you can programmatically clear all Event Viewer logs quickly and efficiently. Yes, it really is that easy!
How can I remotely delete all Event Viewer logs?
Remotely deleting all Event Viewer logs for your clients doesn’t have to be difficult nor time consuming. Just use this script to batch clear the logs, and voila — they’re gone!
We recommend making a backup of your Viewer Event logs as running this script will delete all Event Viewer logs without backing them up.
Explore our shared script library
The all-in-one IT management platform that will take your IT operations to the next level!