Hi Friends,
Here is a powerful powershell script to clear all event logs in windows. Please run in test environment before you decide to use it any further 🙂
Execute this and watch the fun:
wevtutil el | Foreach-Object {Write-Host “Clearing $_”; wevtutil cl “$_”}
PS: The above needs to be executed in Powershell command prompt; Start -> Run -> powershell
Hey Amit,
Tryto use the native cmdlet Clear-Eventlog :
Clear-eventlog -logname application or
Clear-eventlog -logname security -computername RemoteComputer or
Clear-EventLog -logname application -whatif to see before happens
try get-help Clear-Eventlog -full to a complete help to the cmdlet
🙂