Quantcast
Channel: Hey, Scripting Guy! Blog
Viewing all articles
Browse latest Browse all 3333

PowerTip: Cause PowerShell to Wait for Specific Event

$
0
0

Summary: Cause Windows PowerShell to wait for a specific event to be generated.

Hey, Scripting Guy! Question How can I make my Windows PowerShell console halt until an event that I registered by using the 
           Register-CimIndicationEvent cmdlet occurs?

Hey, Scripting Guy! Answer Use the Wait-Event cmdlet and specifiy the source identifier. For example, if you registered
           for an event named nq, use the following command:

Wait-Event -SourceIdentifier nq


Viewing all articles
Browse latest Browse all 3333

Trending Articles