What does this script do?

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

  1. gail

    gail MDL Junior Member

    Feb 15, 2008
    74
    5
    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
    17,677
    15,647
    340
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. beamslider

    beamslider MDL Senior Member

    Feb 1, 2010
    339
    96
    10
    Clears event logs