Powershell

From PC Savants Wiki
Jump to navigation Jump to search

POWERSHELL

Clear ALL Event log entries

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