Contact Info

Crumbtrail

ActiveXperts.com » Administration » Powershell » Powershell 2.0 » Register-WmiEvent

Register-WmiEvent - Powershell 2.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 »

Register-WmiEvent

Short description
Subscribes to a Windows Management Instrumentation (WMI) event.

Syntax


Description
The Register-WmiEvent cmdlet subscribes to WMI events on the local computer or on a remote computer. 

When the subscribed WMI event is raised, it is added to the event queue in your local session even if the event occ
urs on a remote computer. To get events in the event queue, use the Get-Event cmdlet. 

You can use the parameters of Register-WmiEvent to subscribe to events on remote computers and to specify the prope
rty values of the events that can help you to identify the event in the queue. You can also use the Action paramete
r to specify actions to take when a subscribed event is raised.

When you subscribe to an event, an event subscriber is added to your session. To get the event subscribers in the s
ession, use the Get-EventSubscriber cmdlet. To cancel the subscription, use the Unregister-Event cmdlet, which dele
tes the event subscriber from the session.