Windows 7 Forums Search
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows 7. The Windows 7 forum also covers news and updates and has an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7 - How To Clear Administrative Events Log - Event Viewer

 
11-19-2009   #1


Windows 7
 
 

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 System SpecsSystem Spec
11-19-2009   #2


Windows 7 Ultimate (x86)
 
 


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 System SpecsSystem Spec
11-19-2009   #3


Windows 7
 
 


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 System SpecsSystem Spec
.


11-19-2009   #4


Windows 7 Ultimate (x86)
 
 


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
How To Clear Administrative Events Log - Event Viewer-events.png  
My System SpecsSystem Spec
11-19-2009   #5


Windows 7 Professional 32-bit (6.1, Build 7600)
 
 


Quote   Quote: Originally Posted by ColTom2 View Post
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 System SpecsSystem Spec
11-19-2009   #6


Windows 7
 
 


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 System SpecsSystem Spec
11-19-2009   #7


Windows 7 x64 Ultimate SP1
 
 


Hi Coltom,

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

HERE
My System SpecsSystem Spec
11-19-2009   #8


Windows 7 Professional 32-bit (6.1, Build 7600)
 
 


Quote   Quote: Originally Posted by ColTom2 View Post
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 System SpecsSystem Spec
11-19-2009   #9


Windows 7 x64 Ultimate SP1
 
 


The tutorial that I give shows what is being cleared. Basically just anything in the event viewer.
My System SpecsSystem Spec
08-04-2011   #10


Windows 7 Ultimate x64
 
 


Nicely done the batch file runs perfectly!
My System SpecsSystem Spec
Reply

 How To Clear Administrative Events Log - Event Viewer problems?



Thread Tools



Similar Threads for: How To Clear Administrative Events Log - Event Viewer
Thread Forum
Event Viewer One Click Clear Tutorials
USB power events (event viewer) - Flash vs. portable Hardware & Devices
Administrative Events Crashes and Debugging
How to clear Administrative Events under Custom Views? Performance & Maintenance
How to clear events in viewer? General Discussion


All times are GMT -5. The time now is 09:30 PM.



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
  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30