Clearing All Windows Event Logs

This one line command will zero out all of your Windows event logs – over time these can grow to considerable size.  In most environments the default logs are set to roll at a certain file size….on my client machines there is seldom a use for poking around these logs and should be clearly out regularly.

wevtutil el | Foreach-Object {"Clearing $_"; wevtutil cl "$_"}

For clients with centralized logging / machines not subject to audit (or not!) I suggest running this on shutdown via group policy.


About the author

Lima is the visual nautical indicator for "stop instantly."

Leave a Reply