What does this script do?

Discussion in 'Scripting' started by gail, Aug 28, 2015.

  1. gail

    gail MDL Junior Member

    Feb 15, 2008
    93
    8
    0
    I downloaded this script off here i think can somebody tell me what it does and is it useful,must be getting old i cant remember:(

    @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 goto theEnd
    :Do_clear
    echo clearing %1
    wevtutil.exe cl %1
    goto :eof
    :noAdmin
    exit


    Thank You:worthy:
     
  2. Tito

    Tito Super Mod / Adviser
    Staff Member

    Nov 30, 2009
    18,682
    18,581
    340
  3. beamslider

    beamslider MDL Senior Member

    Feb 1, 2010
    333
    94
    10
    Clears event logs