PowerShell Logo Small

Remove-Event



This is the built-in help made by Microsoft for the command 'Remove-Event', in PowerShell version 5 - as retrieved from Windows version 'Microsoft Windows Server 2012 R2 Standard' PowerShell help files on 2016-06-23.

For PowerShell version 3 and up, where you have Update-Help, this command was run just before creating the web pages from the help files.

SYNOPSIS

Deletes events from the event queue.

SYNTAX


Remove-Event [-SourceIdentifier] <String> [-InformationAction {SilentlyContinue | Stop | Continue | Inquire | Ignore | Suspend}] [-InformationVariable [<System.String>]]
[-Confirm] [-WhatIf] [<CommonParameters>]
Remove-Event [-EventIdentifier] <Int32> [-InformationAction {SilentlyContinue | Stop | Continue | Inquire | Ignore | Suspend}] [-InformationVariable [<System.String>]]
[-Confirm] [-WhatIf] [<CommonParameters>]



Search powershellhelp.space

DESCRIPTION


The Remove-Event cmdlet deletes events from the event queue in the current session.


This cmdlet deletes only the events currently in the queue. To cancel event registrations or unsubscribe, use the Unregister-Event cmdlet.



<

RELATED LINKS

Online Version: http://go.microsoft.com/fwlink/p/?linkid=294003
Get-Event
New-Event
Register-EngineEvent
Register-ObjectEvent
Register-WmiEvent
Remove-Event
Unregister-Event
Wait-Event

REMARKS

<

Examples


-------------------------- EXAMPLE 1 --------------------------

PS C:\>remove-event -sourceIdentifier "ProcessStarted"



This command deletes events with a source identifier of "Process Started" from the event queue.










-------------------------- EXAMPLE 2 --------------------------

PS C:\>remove-event -eventIdentifier 30



This command deletes the event with an event ID of 30 from the event queue.










-------------------------- EXAMPLE 3 --------------------------

PS C:\>get-event | remove-event



This command deletes all events from the event queue.