New
#60
When you test and then provide an answer... make sure you give the correct one (the one that works!!!)
This should work.Code:$EventLogs = Get-WinEvent -ListLog * foreach($log in $EventLogs) { [System.Diagnostics.Eventing.Reader.EventLogSession]::GlobalSession.ClearLog($log.LogName) }