25/06/2020
Toplu Event log’larin silinmesi

Merhabalar,
Bu makalemizde windows event logların toplu olarak powershell, komut satırı veya vbs script ile silinmesinin
Komut satırı ile toplu event log silinmesi için;
for /F “tokens=*” %1 in (‘wevtutil.exe el’) DO wevtutil.exe cl “%1”
Powershell ile toplu event log silinmesi için aşağıdaki;
Get-EventLog -LogName * | ForEach { Clear-EventLog $_.Log }
yada
wevtutil el | Foreach-Object {wevtutil cl “$_”}
.bat file silmek için aşağıdaki komutu kullanabilirsiniz;
@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