Clear Windows Event-Logs

This powershell script… well, function. Will enumerate all Windows even-logs and clear them.

This is useful when you want to cleanup a template image or just don’t want any logs hanging around for some reason… your reasons are your own business.

function Clear-EventLog {
	Write-Host Clearing all Windows Event-Logs. -ForegroundColor Green
	wevtutil el | Foreach-Object {
		Write-Host "Clearing Event-Log $_" -ForegroundColor DarkCyan
		wevtutil cl "$_"

Run the function by executing: