Windows-Server-2008

windows 2008如何刪除事件源

  • December 10, 2013

我想在 Windows 2008 中刪除一個事件源。

我不想刪除日誌事件,只是源。

我怎麼做?

我在 PowerShell 中找不到任何執行此操作的命令。

PS > gcm *EventLog -CommandType cmdlet
CommandType     Name                 Definition
-----------              ----                                       ----------
Cmdlet                 Clear-EventLog                 Clear-EventLog [-LogName] <String[]> [[-Computer...
Cmdlet                 Get-EventLog                   Get-EventLog [-LogName] <String> [[-InstanceId] ...
Cmdlet                 Limit-EventLog                 Limit-EventLog [-LogName] <String[]> [-ComputerN...
Cmdlet                 New-EventLog                 New-EventLog [-LogName] <String> [-Source] <Stri...
Cmdlet                 Remove-EventLog          Remove-EventLog [-LogName] <String[]> [[-Compute...
Cmdlet                 Show-EventLog               Show-EventLog [[-ComputerName] <String>] [-Verbo...
Cmdlet                 Write-EventLog               Write-EventLog [-LogName] <String> [-Source] <St...

您可以使用Remove-EventLog取消註冊一個或多個事件源:

Remove-EventLog -Source "My Custom Source"
Remove-EventLog -Source "ASource","Another one","CustomApp123"

引用自:https://serverfault.com/questions/560290