Clear All Event Viewer Logs

Event Viewer is a tool that displays detailed information as event logs about significant events on your PC.

Event logs are special files that record significant events on your PC, such as when a user signs in to the PC or when a app encounters an error. Whenever these types of events occur, Windows records the event in an event log that you can read by using Event Viewer.

Advanced users might find the details in event logs helpful when troubleshooting problems with Windows and other apps. However, you may also wish to be able to quickly clear all event logs at once as needed.

Sometimes system administrators need to clear all existing logs to identify new logs quickly. It is possible to clear the event logs from the windows power shell (Run as administrator). By using the below power shell scripts

Get-WinEvent -ListLog * | where {$_.RecordCount} | ForEach-Object -Process { [System.Diagnostics.Eventing.Reader.EventLogSession]::GlobalSession.ClearLog($_.LogName) }

OR

Get-EventLog -LogName * | ForEach { Clear-EventLog $_.Log }

OR

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

Reference : https://www.tenforums.com/tutorials/16588-clear-all-event-logs-event-viewer-windows.html

Related posts

Delete all contacts & contact groups from a Lync-2010 User

by Jimmy
13 years ago

Moving all Arbitration mailboxes to new database

by Jimmy
6 years ago

Reconnect a disconnected In-Place archive mailbox

by Jimmy
6 years ago
Exit mobile version