Contact Info

Crumbtrail

ActiveXperts.com » Administration » Powershell » Powershell 2.0 » Wait-Event

Wait-Event - 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 »

Wait-Event

Short description
Waits until a particular event is raised before continuing to run.

Syntax


Description
The Wait-Event cmdlet suspends execution of a script or function until a particular event is raised. Execution resu
mes when the event is detected. To cancel the wait, press CTRL+C. 

This feature provides an alternative to polling for an event. It also allows you to determine the response to an ev
ent in two different ways: by using the Action parameter of the event subscription and by waiting for an event to r
eturn and then respond with an action.