in Powershell 5 we can clear a Windows-Event-Log in this way:
Get-EventLog -LogName * | % { Clear-EventLog -LogName $_.log }
how to do this in Powershell 7??? (using powershell only)
Powershell way of handling windows events is now with Get-WinEvent
but it appears no Clear-WinEvent is available
of course we can do this with wevtutil.exe
or even brute-forcing the logs file deletion after stopping the service...
but i'm asking only with native powershell code.