... Home  
... Impressum
... ColorConsole

... CMD
... Netsh-XP
... Netsh-7
... Netsh-Vista
... Powershell


... facebook.de
 
 
ColorConsole [Version 1.7.1000] PowerShell 2.0-Export
Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation.

C:\Windows-7>Powershell get-help Wait-Event -full

# NAME
Wait-Event

# SYNOPSIS
Waits until a particular event is raised before continuing to run.

# SYNTAX
Wait-Event [[-SourceIdentifier] <string>] [-Timeout <int>] [<CommonParameters>]

# DESCRIPTION
The Wait-Event cmdlet suspends execution of a script or function until a particular event is raised. Execution resumes 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 event in two different ways: by using the Action parameter of the event subscription and by waiting for an event to return and then respond with an action.

# PARAMETERS
-SourceIdentifier <string>
Waits only for events with the specified source identifier. By default, Wait-Events waits for any event.

Required? false
Position? 1
Default value All events
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false

-Timeout <int>
Determines the maximum time, in seconds, that Wait-Event waits for the event to occur. The default, -1, waits indefinitely. The timing starts when you submit the Wait-Event command.

If the specified time is exceeded, the wait ends and the command prompt returns, even if the event has not been raised. No error message is displayed.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer and OutVariable. For more information, type,
"get-help about_commonparameters".

# INPUTS
System.String

# OUTPUTS
System.String

# NOTES

Events, event subscriptions, and the event queue exist only in the current session. If you close the current session, the event queue is discarded and the event subscription is canceled.

# EXAMPLE 1

C:\PS>wait-event

# Description
-----------
This command waits for the next event that is raised.

# EXAMPLE 2

C:\PS>wait-event -sourceIdentifier "ProcessStarted"

# Description
-----------
This command waits for the next event that is raised and that has a source identifier of "ProcessStarted".

# EXAMPLE 3

C:\PS>$timer.Interval = 2000
C:\PS> $timer.Autoreset = $false
C:\PS> $timer.Enabled = $true; Wait-Event Timer.Elapsed

# After 2 seconds

EventIdentifier : 12
Sender : System.Timers.Timer
SourceEventArgs : System.Timers.ElapsedEventArgs
SourceArgs : {System.Timers.Timer, System.Timers.ElapsedEventArgs}
SourceIdentifier : Timer.Elapsed
TimeGenerated : 6/10/2008 3:24:18 PM
MessageData :
ForwardEvent : False

# Description
-----------
This command uses the Wait-Event cmdlet to wait for a timer event on a timer that is set for 2000 milliseconds.

# EXAMPLE 4

C:\PS>wait-event -sourceIdentifier "ProcessStarted" -timeout 90

# Description
-----------
This command waits up to 90 seconds for the next event that is raised and that has a source identifier of "ProcessStarted". If the specified time expires, the wait ends.

RELATED LINKS
Online version: http://go.microsoft.com/fwlink/?LinkID=135276
Register-ObjectEvent
Register-EngineEvent
Register-WmiEvent
Unregister-Event
Get-Event
New-Event
Remove-Event
Wait-Event
Get-EventSubscriber

C:\Windows>powershell get-help Get-Event -full

OS: Windows-7 / Windows-Vista // Windows Server 2008
»»»» ColorConsole


0.078
Q-Dir öffnet Computer 4 mal, letzte Einstellung wird nicht behalten!  / Vista Fehlermeldung bei gesperrten Ordner "Connection error"!  / Wie kann ich die Desktop Fenster sinnvoll anordnen?  / Wie kann ich auf den MP3-Playern nur leere Verzeichnisse löschen?  / Kann man in Win-7 beim Bildschirmschoner die Passwortabfrage abstellen?  / Funktion?  / Welche Grafikkarte brauch ich für Win-7 Aero?  / Wie starte ich mit einer Favoriteneinstellung?  / / Lesetipp: 482  / Lange Mauswege per Rechtsklick um einem neuen Tab/Reiter zu öffnen?  / Wie kann Dateiausführungsverhinderung (DEP) in Windows-XP einstellen bzw deaktivieren?  / Wie kann ich das neue Win-7 zu einem bestimten Zeitpunkt ohne Zusatzsoftware herunterfahren?  / Mein PC ist zu heiß, was soll ich machen?  / Was ist der Windows Kompatibilitätsmodus?  / Why can I not create the desktop shortcuts on Vista desktop?  /