Is this command in a batch file or are you entering it in Command Prompt?
Originally Posted by WTenNewbie
I would expect errors if you try to enter it in Command Prompt
In a batch file
for /F "tokens=*" %%a in ('wevtutil.exe el') DO wevtutil.exe cl "%%a"
Typed in Command Prompt
for /F "tokens=*" %1 in ('wevtutil.exe el') DO wevtutil.exe cl "%1"
Note the difference in the percent signs (batch=%% ... typed=%)
The difference in the variable names 1 and a is irrelevant, they could both be anything else x, y, or z.
Your example seems to have missed something - the asterisk
for /f "delims=" %%a
for /f "delims=*" %%a
I'm not sure you actually changed anything - but if you saw things did get changed, then I would just enable everything. Why? Because I don't know the defaults for all of the event listeners ... maybe another member knows.