Cmdlet
Wait-ConsoleDashboard
Pauses dashboard work, or captures its next checkpoint during a recording.
Syntax
Wait-ConsoleDashboard
-Milliseconds <Int32>
[-Session <LiveSession>]
[<CommonParameters>]#Parameter set:
All Parameter SetsDescription
Waits cancellably on the resolved live session and writes no output. A recording target with SkipDelays enabled captures earlier queued updates instead of waiting.
Examples
Example 1
$dashboard = New-ConsoleDashboard -Title 'Scan' -Content {
New-ConsoleProgress -Name overall -Label Targets -Total 3
}
Start-ConsoleDashboard -Dashboard $dashboard -ScriptBlock {
foreach ($count in 1..3) {
Update-ConsoleProgress -Name overall -Value $count
Wait-ConsoleDashboard -Milliseconds 250
}
}Update progress between cancellable pauses
Parameters
- -Milliseconds Int32
- The pause in milliseconds; zero captures a checkpoint without waiting.
- -Session LiveSession
- The live session to update. Defaults to $ConsoleSession or the running dashboard.
Common Parameters
This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.
For more information, see about_CommonParameters.