Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide 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

19 Nov 2009   #1
ColTom2

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
.
19 Nov 2009   #2
Disk4mat

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
19 Nov 2009   #3
ColTom2

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
.

19 Nov 2009   #4
Disk4mat

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 Images
 
My System SpecsSystem Spec
19 Nov 2009   #5
Greg S

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
19 Nov 2009   #6
ColTom2

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
19 Nov 2009   #7
Zardoc

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
19 Nov 2009   #8
Greg S

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
19 Nov 2009   #9
Zardoc

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
04 Aug 2011   #10
seth500

Windows 7 Ultimate x64
 
 

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

 How To Clear Administrative Events Log - Event Viewer




Thread Tools




Similar help and support threads
Thread Forum
Event Viewer One Click Clear
How to Clear Event Viewer with One Click in Windows This will show you how to create a command line shortcut that will clear all of the Event Viewer logs in one click. Here is a batch file that can help you clear the event viewer in one click....
Tutorials
Event Viewer: Clear All Events
How to Clear all Event Logs in Event Viewer using Windows PowerShell This tutorial will show you how to quickly clear all event logs in Event Viewer with a one line PowerShell script. This one line command clears each log in the Event log list one at a time. wevtutil el gets the Event log...
Tutorials
45,120 events in event viewer, I have a keylogger
I have Been getting bsod xd1 from iastora.sys I have come to the conclusion that I want it gone and want to switch to ahci and get rid of irst. Only problem is I heard you have to reinstall to do that and I don't want to. I really need this done and I'm scared because I get bsod in the middle of...
System Security
Administrative Events
How do I clear Administrative Events logs? I can clear the other logs but not the admin. logs...
BSOD Help and Support
How to clear Administrative Events under Custom Views?
How does one clear these? pls view attachment, thanks.
Performance & Maintenance
How to clear events in viewer?
How, in W7, does one clear the events? In vista, I went to actions and clear events. On W7, I do not see a clear events. Thanks Dave
General Discussion


Our Sites

Site Links

About Us

Find 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 12:58.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App