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)


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


2 thoughts on “Powershell Tip #96: Clear all event logs

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

  2. Pingback: Powershell Tip #95: Find the Geolocation of an IP Address - Powershell Guru

Leave a Reply

Your email address will not be published.