How to easily clear the Event Log on Windows computers?

July 6, 2018 |

greater than 3 minutes

Your computer is a complex machine that simultaneously executes thousands of tasks a day, so it’s not surprising that it sometimes runs into errors. To make sure that you are looking for a solution in the right place, you should know how you use the Windows event log feature. You can open it and check for errors, using that program.

However, this log is often overflowing with tasks that have nothing to do with the errors you are searching for. So, to find out how to clear event log in Windows 10, you should read this guide.

The main events that are shown in the Windows Event Log are these:

  • errors
  • warnings
  • information from applications
  • security-related events
  • setup events
  • system evens
  • forwarded events from other Windows devices

You can use one of the following methods to clear event logs in Windows 10, 8, 7.

  • Use Command Prompt
  • Use PowerShell
  • use VBScript/WMI

This next part will show you how to clear all the event logs at once. You will need another method to clear a specific event log, so read on.

Method 1. Use Command Prompt to clear event logs.

Command Prompt is the easiest tool to use for solving system-related problems, and you can use it for your troubleshooting.

  • Step 1. Open Notepad and copy the following text:

@echo off

FOR /F “tokens=1,2*” %%V IN (‘bcdedit’) DO SET adminTest=%%V

IF (%adminTest%)==(Access) goto noAdmin

for /F “tokens=*” %%G in (‘wevtutil.exe el’) DO (call :do_clear “%%G”)


echo Event Logs have been cleared!

goto theEnd


echo clearing %1

wevtutil.exe cl %1

goto :eof


echo You must run this script as an administrator!



  • Step 2. Save this file as .bat or .cmd. You can name the file in quotes, and it will automatically be saved as a .cmd file.
  • Step 3. Right-click the file and choose “Run as administrator” from the drop-down menu.
  • Step 4. Wait for the command to finish.

Method 2. To use Windows PowerShell in order to clean the event logs, you need to take the following steps:

  • Step 1. Go to Search, then type PowerShell into the search bar.
  • Step 2. Right-click the program and select to run as an administrator.
  • Step 3. Copy this line into PowerShell and hit Enter: wevtutil el | Foreach-Object {wevtutil cl “$_”} Type wevtutil el | Foreach-Object {wevtutil cl “$_”}  and press Enter.
  • Step 4. Next, type Exit and close PowerShell

Method 3. Use VBScript?WMI to clear event logs.

You should be aware that this method is applicable only to clear classic event Logs.

  • Step 1. Copy this text into Notepad:

strComputer = ”.”

Set objWMIService = GetObject(“winmgmts:” _

& ”{impersonationLevel=impersonate, (Backup, Security)}!\” _

& strComputer & ”rootcimv2”)

Set colLogFiles = objWMIService.ExecQuery _

(“Select * from Win32_NTEventLogFile”)

For each objLogfile in colLogFiles



  • Step 2. Save the file as .VBS
  • Step 3. Move the file that you just created to this folder: C:/Windows/System32
  • Step 4. Next, open Command Prompt as an administrator (right-click the icon).
  • Step 5. Run this command: CScript ClearEvent.vbs
  • Step 6. Wait until the command is completed. You have cleared your even log in Windows 10 completely.

If you need to clear one item from the Windows Event log, use these methods:

Method 1. Manually clearing items from Windows Event Log

  1. Left-click the Start button.
  2. Open the Control Panel.
  3. Select System and Security.
  4. Then use the Administrative Tools.
  5. Sign in as an administrator and double-click “event viewer”.
  6. In the list of events, you can right-click the event you want to clear. Browse Event Viewer to see what logs you can edit.
  7. Left-click to “Clear log” to delete the event from the log.

Method 2. You can also use Command Prompt to clear one specific event from the log, here is how:

  • Step 1. Run Command Prompt as an administrator.
  • Step 2. Type ‘wevtutil el’ into the cmd window that opened up.
  • Step 3. Find the event you want to clear out in the list that opened up.
  • Step 4. Next, to the name of the program in the log, you should write down the following command: wevtutil cl Example – where Example stands for the name of the program that you want to clear out.
  • Step 5. This will help you eliminate the event from the event log manually using Command Prompt.

Of course, the manual clearing out of the logs is time-consuming, and if you don’t have technical background, that can be overwhelming even without guides. However, there is a solution: you can use a tool like Auslogics Anti-Malware to make sure that your computer was not infected by any malicious software that led to errors that you are trying to get rid of.

Auslogics Anti-Malware will check if malware has penetrated your system.

Share it:
Do you like this post?
1 Star2 Stars3 Stars4 Stars5 Stars (5 votes, average: 5.00 out of 5)