Contact Info

Crumbtrail

ActiveXperts.com » Administration » Powershell » Powershell 3.0 » Unregister-Event

Unregister-Event - Powershell 3.0 CmdLet

ActiveXperts Network Monitor ships with integrated Powershell scripts to monitor complex network. The scripts run out of the box
Download the ActiveXperts Network Monitor FREE version now »

Unregister-Event

Short description
Cancels an event subscription.

Syntax
Unregister-Event [-SourceIdentifier] <String> [-Force] [-Confirm] [-WhatIf] [<CommonParameters>]
Unregister-Event [-SubscriptionId] <Int32> [-Force] [-Confirm] [-WhatIf] [<CommonParameters>]





Description
The Unregister-Event cmdlet cancels an event subscription that was created by using the Register-EngineEvent, Register-
ObjectEvent, or Register-WmiEvent cmdlet.


When an event subscription is canceled, the event subscriber is deleted from the session and the subscribed events are 
no longer added to the event queue. When you cancel a subscription to an event created by using the New-Event cmdlet, t
he new event is also deleted from the session.


Unregister-Event does not delete events from the event queue. To delete events, use the Remove-Event cmdlet.