- How to Clear All Event Logs in Windows 10
- How to Clear Event Logs
- 1. Clear Events Manually
- 2. Clear Events from Command Prompt
- 3. Clear All Events using Command Prompt
- 4. Clear All Events using PowerShell
- Clear-Event Log
- Syntax
- Description
- Examples
- Example 1: Clear specific event log types from the local computer
- Example 2: Clear specific multiple log types from the local and remote computers
- Example 3: Clear all logs on the specified computers then display the event log list
- Example 4: Clear all logs on the specified computers then display the event log list
- Parameters
- Inputs
- Methods to Completely Clear Windows Event Log
- Learn how to delete event log files in Windows in this informative tutorial. Two stepwise solutions have been provided to clear Windows event log right here.
- Part 1: How to Delete Event logs
- Part 2: How to Completely Clear Windows Event Log
How to Clear All Event Logs in Windows 10
August 13, 2018 By Ansh R
Event Logs are exactly what its name says. It keeps records of everything that takes place on the computer. When you or any other user had logged in on your computer, when an app was opened or when an error or app crash occurred, every event is recorded in the Event Logs.
Event Logs can be easily accessed using Event Viewer. So, if some error or any issue has happened on your computer, you can easily check its details from the Event Viewer. This helps a lot while troubleshooting any problems that have occurred on the computer.
Many people may want to clear an event or all events from the Event Logs. It can be done pretty easily. There are a number of ways to clear an event and all events from the Event Logs. If you are also looking for a way to do that, simply follow the methods mentioned below.
How to Clear Event Logs
Clearing the events from Event Logs is very easy. Perform the methods to do so.
Note: To access and delete Event Logs, you have to be logged in as administrator on the computer. If you are not logged in as the administrator, you will not be able to perform these methods. So, before following the methods, make sure you are logged in as administrator.
1. Clear Events Manually
In the first method, we will show you how to clear events from Event Logs manually. Here, we will delete the records of events right from the Event Viewer. Follow the steps to perform this method.
Step 1. Open Control Panel. To do this, go to Cortana and type Control Panel in the search area. Select Control Panel from search results.
Step 2. Now in the Control Panel, click on System and Security.
Step 3. Here, look for Administrative Tools and open it.
Step 4. The last page will open an explorer window full of Administrative Tools. Now, locate Event Viewer and double-click on it to open it.
Step 5. In the Event Viewer window, you will see the different set of events. If you want to delete an event, simply expand the event sets to find the particular event and then right-click on the event. Now select Clear log. When you are done, close the Event Viewer.
If you want to delete more events, simply perform the last step as many times as you want.
2. Clear Events from Command Prompt
In this method, we will show you how to clear events from Command Prompt. Here, you will be able to clear an event one by one. Follow the steps to perform this method.
Step 1. Open Command Prompt as Administrator. To do this, go to Cortana and type Command Prompt in the search area. Now, right-click on Command Prompt from search results and select Run as administrator.
Step 2. Now, in the Command Prompt window, type the following command and press Enter.
wevtutil el
Step 3. After the last step, a list of events will show up on the Command Prompt window. Here, look for the ones you want to delete.
Step 4. After the selecting an event you want to delete, type the following command and press Enter to delete the event.
wevtutil cl xyz
Here “xyz” is the name of the event you want to delete. Simply replace “xyz” with the event name you wish to clear from Event Logs.
That’s it. The event you wanted to delete, is no more mentioned in the Event Logs. To clear more events, simply repeat the last step with that event name in the command.
3. Clear All Events using Command Prompt
Clearing all the events using the Command Prompt is easy as well. In this method, we will use a .cmd file. Everything is explained below in the steps. Follow the steps to perform this method.
Step 1. First, we will have to create a .cmd file with some commands. To do this, go to your desktop and right-click on empty space. Here, go to New and then select Text document from the list of options that opens.
Step 2. Now, go back to Desktop and double-click on New text document to open the text document file you have just created.
Step 3. In the text document, copy and paste 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.
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
Step 4. Now, from the top left side of the window, open the File drop-down menu and select Save as….
Step 5. In the File name section, type ClearLog.cmd and click on Save. This will save the file with .cmd extension and with file name as ClearLog.
Step 6. Look for the file ClearLog fileon your desktop. You have to open it as administrator. To do that, right-click on it and select Run as administrator.
Now, you don’t have to anything. The Command Prompt window will open and it will clear all the events from Event Logs automatically.
4. Clear All Events using PowerShell
Windows PowerShell is another powerfull tool to execute commands. In this method, we will delete all the events using Windows PowerShell. Follow the steps to perform this method.
Step 1. Open Windows PowerShell as Administrator. To do this, go to Cortana and type powershell in the search area. Now, right-click on Windows PowerShell from search results and select Run as administrator..
Step 2. Now in the Windows PowerShell window, enter any one of the following commands and press Enter.
wevtutil el | Foreach-Object
OR
Get-EventLog -LogName * | ForEach
Step 3. The command will now clear all the events from Event Logs. Now simply type Exit and press Enter to close Windows PowerShell.
We hope we were able to help you clear events from Event Logs. If you have any questions, or if had any problem performing any of the methods, please mention them below in comments.
Clear-Event Log
Clears all entries from specified event logs on the local or remote computers.
Syntax
Description
The Clear-EventLog cmdlet deletes all of the entries from the specified event logs on the local computer or on remote computers. To use Clear-EventLog , you must be a member of the Administrators group on the affected computer.
The cmdlets that contain the EventLog noun (the EventLog cmdlets) work only on classic event logs. To get events from logs that use the Windows Event Log technology in Windows Vista and later versions of Windows, use the Get-WinEvent cmdlet.
Examples
Example 1: Clear specific event log types from the local computer
This command clears the entries from the Windows PowerShell event log on the local computer.
Example 2: Clear specific multiple log types from the local and remote computers
This command clears all of the entries in the Microsoft Office Diagnostics (ODiag) and Microsoft Office Sessions (OSession) logs on the local computer and the Server02 remote computer.
Example 3: Clear all logs on the specified computers then display the event log list
This command prompts you for confirmation before deleting the entries in the specified event logs.
Example 4: Clear all logs on the specified computers then display the event log list
This function clears all event logs on the specified computers and then displays the resulting event log list.
Notice that a few entries were added to the System and Security logs after the logs were cleared but before they were displayed.
Parameters
Specifies a remote computer. The default is the local computer.
Type the NetBIOS name, an Internet Protocol (IP) address, or a fully qualified domain name of a remote computer. To specify the local computer, type the computer name, a dot (.), or «localhost».
This parameter does not rely on Windows PowerShell remoting. You can use the ComputerName parameter of Get-EventLog even if your computer is not configured to run remote commands.
Type: | String [ ] |
Aliases: | Cn |
Position: | 1 |
Default value: | Local computer |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Prompts you for confirmation before running the cmdlet.
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Specifies the event logs. Enter the log name (the value of the Log property not the LogDisplayName) of one or more event logs, separated by commas. Wildcard characters are not permitted. This parameter is required.
This parameter is supposed to accept values from the pipeline by property name. However, there is a bug that prevents this from working. You must pass a value using the parameter directly.
Type: | String [ ] |
Aliases: | LN |
Position: | 0 |
Default value: | None |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Inputs
None
You cannot pipe objects to Clear-EventLog .
Methods to Completely Clear Windows Event Log
Learn how to delete event log files in Windows in this informative tutorial. Two stepwise solutions have been provided to clear Windows event log right here.
Amy Dennis
Dec 21, 2020 • Filed to: Recover & Repair Files • Proven solutions
Windows event log can provide a complete record of a user’s activity. By accessing the event log file, anyone can know about your private information. Therefore, if you wish to protect your privacy, then you should certainly delete the event log regularly. It doesn’t matter if you are using a personal computer or if your system is connected to a network, you should make a habit to clear the Windows event log. There are lots of ways to do this. In this guide, we will teach you how to delete event log files using the Windows native interface and a third-party tool. Let’s get it started and clear the Windows event log without much trouble.
Part 1: How to Delete Event logs
As you already know, the event log can contain an in-depth record of a user’s activity on Windows. Therefore, after attaining the log file, anyone can know about your activity. Don’t worry! You can clear the Windows event log right from the native interface of the operating system. Even though you can go to the Command Prompt on Windows to delete the event log, it is a rather complicated process. We have provided an easy and foolproof way to delete event logs via the Windows native interface. It can be done by following these steps:
1. Firstly, you need to access the Event Viewer window. To do this, you can open the Run prompt and provide the «eventvwr.msc» command to launch.
2. Additionally, you can also press Windows and X key on your keyboard at the same time to get a quick access menu. From here, select the «Event Viewer» option to open the window.
3. This will launch the Event Viewer interface. From here, you can access all the event logs and edit them as per your needs.
4. From the left panel, under the «Windows Log» section, most of the logs can be accessed. To clear any kind of log, select it, right-click, and choose the option of «Clear Log».
5. For instance, if you wish to clear application logs, select «Application» and right-click. Out of all the provided options, click on «Clear Log».
6. You can also selectively clear the Windows event log as well. To do this, select the event log type from the left panel. Afterward, you can access the log you wish to delete from the right panel and choose the «Clear Log» option from the list of Actions.
7. We have done the same to clear a System Log. After selecting «System» from the left panel, a selection is made on the right side. In the end, the «Clear Log» action is selected to delete the event log.
8. As soon as you would make your selection, you will get the following pop-up message. This will let you clear your logs or save and clear it.
9. Confirm your choice and wait for a while as Windows will delete the event log from it.
The exact interface and technique might vary from one version of Windows to another as well. Nevertheless, after following these instructions, you would be able to clear the Windows event log without much trouble. Though, these files can later be restored after performing a recovery operation. If you wish to permanently delete event log files without any recovery scope, then we recommend using a third-party data eraser tool.
Part 2: How to Completely Clear Windows Event Log
By following the above-mentioned drill, you would be able to clear the Windows event log without much trouble. Since these files won’t be deleted permanently, you need a reliable data eraser tool. Stellar BitRaser for the file will be an ideal application that can help you get rid of your data permanently and in seconds. It has an easy to use interface and provides a safe solution to delete data of different kinds. From internet activities to system traces and applications to event logs, it can get rid of almost everything on your system forever. Here are some of its other features:
- Stellar BitRaser for the file can be used to get rid of system traces of different kinds, including event logs.
- It performs the deletion of your data permanently without giving any recovery scope.
- BitRaser can be used to delete internet activities, data files, application data, and other kinds of content as well.
- One can also perform an automatic deletion of data using its scheduler.
- BitRaser for the file also provides an erase certificate after completing the process successfully.
- It features different kinds of algorithms that can be picked from its settings.
- You can free up unused and empty space with BitRaser for the file.
- It is compatible with all the leading versions of Windows.
Step 1: Download Stellar BitRaser for the file on your Windows computer and launch it.
Step 2: Simply click on «System Traces» and access all the major features of it from the right panel.
Step 3: Scroll down a little to find the option of «Windows Event Log».
Step 4: Select it and click on the «Erase Now» button to clear the Windows event log. In no time your event log files would be deleted from your system.
With BitRaser for file, you can delete the event log in Windows without any trouble. This will help you clear the Windows event log permanently in one click. You can simply perform multiple passes as well to get an added assurance.
Don’t wait anymore and protect your privacy using BitRaser. Clear Windows event log and all the system traces from its interactive interface. It is a remarkable tool that will certainly come handy to you on numerous occasions to safeguard your privacy and important data files.