Command
New-ImageStoryReplay
Converts ordered capture records into a resolved replay without executing commands.
Syntax
New-ImageStoryReplay [-CustomPrompt <String>] [-Dialect <TerminalDialect>] -DurationSeconds <Double> -InputObject <PSObject[]> [-Title <String>] [-WorkingDirectory <String>] [<CommonParameters>]#Parameter set:
All Parameter SetsDescription
Each event supplies TimestampSeconds and Kind. Command, Output, ReplaceLine, Directory and Marker use Text. OpenTab uses TabId, Title, Dialect, WorkingDirectory and CustomPrompt; SelectTab uses TabId. Output and ReplaceLine can supply Tone. Capture scripts remain a separate, explicit caller action.
Examples
Prepare recorded output for playback
$events = @(
@{ TimestampSeconds = 1; Kind = 'Command'; Text = './Test-Project.ps1' }
@{ TimestampSeconds = 12; Kind = 'Output'; Text = '24 checks passed'; Tone = 'Success' }
)
$replay = New-ImageStoryReplay -DurationSeconds 15 -Events $events
$replay.CompressPauses([TimeSpan]::FromSeconds(2))Parameters
- -CustomPrompt String
- Prompt required by the Custom dialect.
- -Dialect TerminalDialect
- Initial prompt dialect.
- Possible values:
PowerShell,Bash,CommandPrompt,Python,CSharp,Custom - -DurationSeconds Double
- Recorded endpoint, including idle time.
- -InputObject PSObject[]
- Ordered dictionaries or objects, including objects read with ConvertFrom-Json.
- -Title String
- Initial session title.
- -WorkingDirectory String
- Initial prompt directory.
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.