Home Windows 10 Clear All Event Logs in Event Viewer in Windows 10

Clear All Event Logs in Event Viewer in Windows 10

0
Clear All Event Logs in Event Viewer in Windows 10

Clear All Event Logs in Event Viewer in Windows 10

Whatever happing on your Windows 10 PC is stored in Windows Event Viewer in Security, System, Application based on their criteria. details in the event log helpful when troubleshooting problems with Windows. However, you may also wish to be able to quickly clear all event logs at once as needed.

Here are the methods to clear event viewer logs in windows 10 in One-click:-

1.Clear event viewer using Command Prompt

Command Prompt is always my favorite tool that i used to perform the various task quickly, You are easily able to clear event viewer logs with Command Prompt also.

First, open the Elevated Command prompt by right-clicking on the Start menu and select “Command prompt (admin)

Clear All Event Logs in Event Viewer in Windows 10

and enter the below command and Press Enter

for /F “tokens=*” %1 in (‘wevtutil.exe el’) DO wevtutil.exe cl “%1”

It will start cleaning all Logs and within minutes, all event viewer logs will be cleared.

Clear All Event Logs in Event Viewer in Windows 10

2.Clear event viewer using PowerShell

PowerShell is one of most powerful that is used to perform various task soo quickly same like Linux terminal.

Open Elevated PowerShell command, by searching PowerShell is search menu and Right-click on it and select “Run as administrator” option.

Clear All Event Logs in Event Viewer in Windows 10

and enter the below commands

wevtutil el | Foreach-Object {wevtutil cl “$_”}

3.Clear event viewer using BAT File

You need to create a BAT file with below code,

@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.
echo goto theEnd
:do_clear
echo clearing %1
wevtutil.exe cl %1
goto :eof
:noAdmin
exit

Open the Notepad and paste the above code, click on the File > Save as and in the “Save as type” select “All Files” and enter whatever name that you want’s and makefile extension.BAT.

and Right-click on your BAT file and select ‘Run as administrator” option and it will start cleaning.

clear event viewer logs in windows 10

Hope my article “Clear All Event Logs in Event Viewer in Windows 10” helps you to clear event logs in event viewer. If you have any query, feel free to comment.

Also, Check How to Take Windows 10 Drivers Backup Using Powershell

How to Always Run Powershell as an Administrator in Windows 10

How to Always Run Powershell as an Administrator in Windows 10

Advertisements

LEAVE A REPLY

Please enter your comment!
Please enter your name here

ten + nineteen =