How To Clear Administrative Events Log - Event Viewer

Page 1 of 2 12 LastLast

  1. Posts : 20
    Windows 7
       #1

    How To Clear Administrative Events Log - Event Viewer


    Hi:

    Does anyone know how to clear the Administrative Events log listed under Custom Views in the Event Viewer?

    All the logs listed under the Windows logs have options to clear, but the above does not.

    Thanks,

    ColTom2
      My Computer


  2. Posts : 167
    Windows 7 Ultimate (x86)
       #2

    Thats just a filter. I dont know of any way to clear it other than clearing all events that appear in it under: System, Security and Application event logs.
      My Computer


  3. Posts : 20
    Windows 7
    Thread Starter
       #3

    Well apparently they are cummulative and just keep adding on each day. Surely there must be some simple manner in which to clear these Administrative Events.

    Or is there a max number that will be allowed to appear or will they just go on to an infinte number?

    Thanks,

    ColTom2
      My Computer


  4. Posts : 167
    Windows 7 Ultimate (x86)
       #4

    Events are recorded all the time. Constantly. What your looking at is a filter comprised of events from numerous logs/sources. I dont know of any way to remove the filter. But even if it could be removed, the events will still be recorded.

    There are max number/log sizes for every log. The filter from what I can tell has no limit. You can adjust the limit (max size) for individual logs.
    Attached Thumbnails Attached Thumbnails How To Clear Administrative Events Log - Event Viewer-events.png  
      My Computer


  5. Posts : 824
    Windows 7 Professional 32-bit (6.1, Build 7600)
       #5

    ColTom2 said:
    Hi:

    Does anyone know how to clear the Administrative Events log listed under Custom Views in the Event Viewer?

    All the logs listed under the Windows logs have options to clear, but the above does not.

    Thanks,

    ColTom2
    I've tried this and it works to do what you are asking. Save the code as .bat and run it. I'll try and search for the source and post back with it.
    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 Event Logs have been cleared! ^<press any key^>
    goto theEnd
    :do_clear
    echo clearing %1
    wevtutil.exe cl %1
    goto :eof
    :noAdmin
    echo You must run this script as an Administrator!
    echo ^<press any key^>
    :theEnd
    pause>NUL
      My Computer


  6. Posts : 20
    Windows 7
    Thread Starter
       #6

    Hi Greg:

    Running the batch file as you provided did the trick, as it cleaned out all Administrative Event Log entries. Wonder what else it cleaned out....

    Thanks,

    Co;Tom2
      My Computer


  7. Posts : 557
    Windows 7 x64 Ultimate SP1
       #7

    Hi Coltom,

    There is a tutorial in this forum for this and a way to run in admin mode.

    HERE
      My Computer


  8. Posts : 824
    Windows 7 Professional 32-bit (6.1, Build 7600)
       #8

    ColTom2 said:
    Hi Greg:

    Running the batch file as you provided did the trick, as it cleaned out all Administrative Event Log entries. Wonder what else it cleaned out....

    Thanks,

    Co;Tom2
    Do a search for wevtutil.exe and one of the MS related sites should be near the top listing. It's a tool for managing event logs
      My Computer


  9. Posts : 557
    Windows 7 x64 Ultimate SP1
       #9

    The tutorial that I give shows what is being cleared. Basically just anything in the event viewer.
      My Computer


  10. Posts : 968
    Windows 7 Ultimate x64
       #10

    Nicely done the batch file runs perfectly!
      My Computer


 
Page 1 of 2 12 LastLast

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 16:40.
Find Us