Powershell Tip #96: Clear all event logs

By | April 23, 2016

Tip: You can clear all the events logs (Windows Logs + Application and Services Logs)

clear-all-event-logs-powershell

The solution 1 is faster than the solution 2.

I clear all the event logs and created 500 000 events on Application, System and Windows Powershell logs.

Solution 1 (GlobalSession.ClearLog) : 0.64 seconds
Solution 2 (wevtutil) : 4.6 seconds


previous-buttonnext-button

One thought on “Powershell Tip #96: Clear all event logs

  1. Pingback: Powershell Tip #97: Change size of event logs | Powershell Guru

Leave a Reply

Your email address will not be published. Required fields are marked *