Делаем файл "ClearAllEvents.ps1":
Param(
[string] $computerName = "localhost"
)
$logs = get-eventlog -computername $computername -list | foreach {$_.Log} | foreach {clear-eventlog -comp $computername -log $_ }
get-eventlog -computername $computername -list
Param(
[string] $computerName = "localhost"
)
$logs = get-eventlog -computername $computername -list | foreach {$_.Log} | foreach {clear-eventlog -comp $computername -log $_ }
get-eventlog -computername $computername -list
Комментариев нет:
Отправить комментарий