How to Delete System Logs in Windows 7

How to clear the Event Log in Windows 10, 7

Passionate about all elements related to Windows and combined with his innate curiosity, Ivan has delved deep into understanding this operating system, with a specialization in drivers and driver troubleshooting. When he's not tackling... Read more

Updated:

Posted: September 2014

clear event log windows 10

XINSTALL BY CLICKING THE DOWNLOAD FILE

When you are checking for any kind of errors on your Windows 10, 8.1, 7 operating system, the best way to do this is by opening the Windows event log feature available in any Windows OS version. Also, when you are searching for a specific event that happened in your system, it might get a little confusing having the event log full of other kinds of messages. For a quick access to what you are looking for, I will show you below how you can clear an event log in Windows 10, 8, 7.
clear event log in Windows 8
In the Windows 10, 8, 7 event log, you can view the errors, warnings or information from either the applications you are running on Windows 10, 8, 7 or Security related events, Setup events, System events and even forwarded events that come from other Windows devices. Clearing the event log can be done manually by selecting the events you want to clear one at a time.

Clear Event Viewer in Windows 10, 8, 7

  1. Clear Windows Event Log manually
  2. Use Command Prompt

1. Clear the Windows Event Log manually

  1. Left click or tap the start button.
  2. Left click on Control Panel in the start menu.
  3. Left click on System and Security.
  4. Left click on Administrative Tools in the System and Security window. You can also type 'event' in the search menu and select 'View event logs'view event logs control panel
  5. Now you will need to be signed in as administrator and double click (left click) on "Event Viewer" .
  6. After opening Event Viewer you will have there a list of events that you can access.event logs windows 10
  7. Right click on the event you want to clear and then left on the "Clear log".
  8. After you are finished with clearing the event logs close the Event log window and you can go on with your work.
  • RELATED: 5 best Windows 10 event log viewers

2. Use Command Prompt

  1. In the start screen you have on Windows 10, 8, 7 start typing "cmd.exe"
  2. After it finds the "cmd" icon you will need to right click on it and select "Run as administrator".
  3. You will need to type in the "cmd" window you opened "wevtutil el" without the quotes. This will show you all the events you have.wevtutil el
  4. Now that you have the list of event logs in front of you write down the one you want to clear.
  5. For clearing a specific event write down the command below followed by the name of the log.
    wevtutil cl Example
    Note: In the case you have above the "Example" is the name of the log you want to clear.

Now you have two methods for clearing event logs in Windows 10, 8, 7. As a side note, you should be very careful not to delete an event log you might need later.

How to Clear Event Logs in Windows 10, 8, 7

  1. Clear Event Logs With Command Prompt
  2. Clear Event Log With PowerShell
  3. Clear Event Logs Using VBScript/WMI

The two methods listed above show you how to clear a specific event log from Windows 10, 8 or Windows 7. Now, we're going to show you how to clear all the event logs at once. There are a couple of methods for clearing all event logs at once, so you can pick one that best suits your needs.

  • RELATED: Manage Event Log channels with Nirsoft's EventLogChannelsView release

Method 1 – Clear Event Logs With Command Prompt

Command Prompt is probably the most used tool for solving all system-related problems, and it can be used for clearing all event logs, as well. Here's what you need to do to clear all event logs with Command Prompt:

  1. Open Notepad 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
  2. Save that text as .bat or .cmd file (Name the file with quotes to automatically save it as .cmd file, like "ClearLog.cmd")
  3. Run .cmd file you just saved as administrator clear event log windows 10
  4. Just let the command finish event log clear windows 10

Expert Tip: Some PC issues are hard to tackle, especially when it comes to corrupted repositories or missing Windows files. If you are having troubles fixing an error, your system may be partially broken. We recommend installing Restoro, a tool that will scan your machine and identify what the fault is.
Click here to download and start repairing.

That's all, your all your event logs are now cleared. This is probably the simplest way to clear all event logs in Windows 10 or Windows 8.1, but if you want to try other ways, see how to do that, below.

Method 2 – Clear Event Log With PowerShell

To clear all event logs with Windows PowerShell, do the following:

  1. Go to Search, type powershell, right click on PowerShell and choose Run as administrator
  2. Enter the following line into PowerShell and press Enter:
    • wevtutil el | Foreach-Object {wevtutil cl "$_"} event log clear windows 10 powershell
  3. Now just type Exit to close PowerShell window
  • RELATED: How to fix the Event 1000 Application Error on Windows 10

Method 3 – Clear Event Logs Using VBScript/WMI

Here's how to clear all Event Logs using VBScript/WMI (but be noted that you can clear only classic Event Logs):

  1. Open Notepad and enter the following text:
    • strComputer = "."
      Set objWMIService = GetObject("winmgmts:" _
      & "{impersonationLevel=impersonate, (Backup, Security)}!" _
      & strComputer & "rootcimv2")
      Set colLogFiles = objWMIService.ExecQuery _
      ("Select * from Win32_NTEventLogFile")
      For each objLogfile in colLogFiles
      objLogFile.ClearEventLog()
      Next
  2. Save it as VBScript (.VBS), take a look at method 1 on how to save file as .vbs directly, name it, for example ClearEvent.vbs
  3. Move ClearEvent.vbs you just created to C:/Windows/System32
  4. Now open Command Prompt as administrator and run the following command:
    • CScript ClearEvent.vbs event log clear windows 10

That's all, now you know a high variety of ways to clear your Event Log in Windows 10, Windows 8.1 and Windows 7. Clearing your Event Log is very useful, especially when you're trying to pinpoint the exact cause of an error that you recently experienced. If you have any questions, just reach for the comment section below.

RELATED STORIES TO CHECK OUT:

  • How to fix the service control manager event ID 7000 logon error in Windows
  • How to fix mfc100.dll errors on Windows 10, 8.1
  • How to fix any DLL errors in Windows 10, 8, 8.1

newsletter icon

Newsletter

How to Delete System Logs in Windows 7

Source: https://windowsreport.com/clear-event-log-windows-8/

0 Response to "How to Delete System Logs in Windows 7"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel