Skip to content

Stop-SpectreRecording

Description

Stops a recording of the current console output and returns the recording.
I’ve used this to record the examples on the docs help site.


Examples

Example 1
This example demonstrates how to record the spectre console output.

Terminal window
$recording = Start-SpectreRecording -RecordingType "Html" -CountdownAndClear
# Use spectre console functions, these will be recorded
Write-SpectreHost "Hello [red]world[/]"
# Finish the recording
$result = Stop-SpectreRecording
# Output the results
Write-SpectreHost "Result:`n$result"

Parameters

Title

The title of the recording, only used for asciinema recordings.

TypeRequiredPositionPipelineInput
[String]false1false

OutputPath

The path to save the recording to.

TypeRequiredPositionPipelineInput
[String]false2false

Syntax

Terminal window
Stop-SpectreRecording [[-Title] <String>] [[-OutputPath] <String>] [<CommonParameters>]