How to delete event source windows 2008
I would like to delete an event source in windows 2008.
I don't want to delete the log event, just the source.
How do I do that?
I don't find any command i PowerShell that does that.
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...
You can use Remove-EventLog
to unregister one or more event sources:
Remove-EventLog -Source "My Custom Source"
Remove-EventLog -Source "ASource","Another one","CustomApp123"