-
December 17th, 2015 10:21 AM #1AlphaOmegaGuest
clearing ALL adminstrative Service events at once
I was looking for a way to clear the administrative events in the event viewer/custom views/administrative events,but their was no right click/clear events in this particular area.For the rest of the events there was.Any how,upon searching for a way to clear it i found a .bat file that would clear ALL administrative events with a single click right from your desktop.I tried it and it works pretty slick and quick.Some or most of you may have seen this,but then for those who have not,i will share it.This is for windows 7 by the way.I dont know how to do it in windows 8 as i never looked it up.
To get right to it.
1. Open notepad.
2. Copy the code below into notepad
3. Save it as (Delete Events.bat) without the quotes anywhere you want.
4. Double click the file and Vualaa!
The command prompt will open up and wipe all of them out instantly.Depending on how many events you have,it could take only seconds
or a minute.mine took about 5 seconds or less.
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
Just thought i would share
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
Clearing Windows Icon Caches.
By Big V in forum Custom IconsReplies: 7Last Post: December 21st, 2014, 09:30 PM -
Service window
By bongo in forum Windows and caption buttonsReplies: 2Last Post: October 10th, 2010, 11:14 PM -
Calendar + adding events !
By diantonio in forum OS & Hardware Help and SupportReplies: 0Last Post: August 28th, 2010, 09:13 AM
Thank you:happy::happy:
Office 16 64-bit Color...