Complete-ConsoleRun
Finishes a run dashboard and prints its full summary into scrollback.
Syntax
Complete-ConsoleRun
[-PassThru]
[-Run] <LiveRun>
[<CommonParameters>]#All Parameter SetsDescription
Marks unfinished items skipped, releases held log lines, restores the terminal and prints totals, groups, full wrapped problems and the report path. Safe to call more than once. If deferred host output cannot finish within five seconds, reports a timeout and retains it for a later call. Put it in finally so cancellation or errors restore the terminal. PassThru returns the structured snapshot; ordinary results and the script's exit code are unchanged.
Examples
Example 1
$summary = Complete-ConsoleRun $run -PassThru; $summary.Items | Where-Object State -eq FailKeep a structured final result
Parameters
- -PassThru SwitchParameter
- Return the final structured snapshot.
- -Run LiveRun
- The handle returned by New-ConsoleRun.
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.