Contact Info

Crumbtrail » Administration » Powershell » Powershell 2.0 » Unregister-Event

Unregister-Event - Powershell 2.0 CmdLet

Microsoft Windows PowerShell is a command-line shell and scripting tool based on the Microsoft .NET Framework. It is designed for system administrators, engineers and developers to control and automate the administration of Windows and applications.

More than hundred command-line tools (so called "cmdlets") can be used to perform system administration tasks and Windows Management Instrumentation (WMI). These cmdlets are easy to use, with standard naming conventions and common parameters, and standard tools for piping, sorting, filtering, and formatting data and objects.


Short description
Cancels an event subscription.

Unregister-Event [-SubscriptionId] <int> [-Force] [-Confirm] [-WhatIf] [<CommonParameters>]

Unregister-Event [-SourceIdentifier] <string> [-Force] [-Confirm] [-WhatIf] [<CommonParameters>]

The Unregister-Event cmdlet cancels an event subscription that was created by using the Register-EngineEvent, Regis
ter-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 c
mdlet, the 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.