Windows – How to empty Windows 8 event log

event-logwindows 8

I know how to empty event log on windows XP, and then I have a script which cleans the numerous Windows 7 log categories. The windows 7 script looks like this:

wevtutil.exe cl Analytic

wevtutil.exe cl Application

wevtutil.exe cl DirectShowFilterGraph

wevtutil.exe cl DirectShowPluginControl

wevtutil.exe cl EndpointMapper

wevtutil.exe cl ForwardedEvents

wevtutil.exe cl HardwareEvents

wevtutil.exe cl Internet Explorer

wevtutil.exe cl Key Management Service

wevtutil.exe cl MF_MediaFoundationDeviceProxy

But the script receives access denied under windows 8 (even with Administrator account).

1- Is there a better method tho empty Windows 8 log? Or is there any way to make the script work again?

2- How is it possible to increase the event log file size in Windows 8?

Thanks.

Best Answer

1) I've been using the same batch file script since Vista, and it still works fine under 8. It's similar to yours, but does ALL the logs regardless of their name:

WEVTUTIL EL > .\LOGLIST.TXT
for /f %%a in ( .\LOGLIST.TXT ) do WEVTUTIL CL %%a
del .\LOGLIST.TXT

You will have to right-click the batch file and run it elevated ("as administrator").

2) You can enlarge individual logs by right-clicking them in Event Viewer and editing the Properties:

enter image description here

Related Question