Description
This function takes a script block as a parameter and executes it while displaying a progress bar. The context and task objects are defined at https://spectreconsole.net/api/spectre.console/progresscontext/.
The context requires at least one task to be added for progress to be displayed. The task object is used to update the progress bar by calling the Increment() method or other methods defined in Spectre console https://spectreconsole.net/api/spectre.console/progresstask/.
Examples
EXAMPLE 1
EXAMPLE 2
EXAMPLE 3
EXAMPLE 4
Parameters
ScriptBlock
The script block to execute.
Type | Required | Position | PipelineInput |
---|
[ScriptBlock] | true | 1 | false |
Syntax