WEVTUTIL CL fails if the event log channel has a space in it
Posted: 17 Mar 2020 23:06
for /f %%a in ( C:\LOGLIST.TXT ) do WEVTUTIL CL "%%a"
The textfile is created from WEVTUTIL EL >>C:\LogList.txt
For example, this:
Internet Explorer
will fail with error
Failed to clear log Internet.
The specified channel could not be found.
Whereas
HardwareEvents
Will work fine. Only happens when channel name has a space.
Any ideas why?
The textfile is created from WEVTUTIL EL >>C:\LogList.txt
For example, this:
Internet Explorer
will fail with error
Failed to clear log Internet.
The specified channel could not be found.
Whereas
HardwareEvents
Will work fine. Only happens when channel name has a space.
Any ideas why?