Add files via upload

This commit is contained in:
Belim 2023-02-23 11:56:11 +01:00 committed by GitHub
parent 4d39c00011
commit e1adfca7f6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 0 deletions

View File

@ -0,0 +1,7 @@
[Info]
DisplayName=Clear event logs
Publisher=Builtbybel
AboutScript=In some cases it is necessary to delete all entries from Windows event logs on a computer or a server. Of course, you can clear the system logs from the Event Viewer console GUI - Eventvwr.msc (right-click the log you would like to clear and select Clear Log).
ScriptLanguage=PowerShell
ConditionScript=clear-event_logs.ps1
CreateNoWindow=true

View File

@ -0,0 +1,2 @@
Import-Module Microsoft.PowerShell.Management
Get-EventLog -LogName * | ForEach { Clear-EventLog $_.Log }