Cmdlet
Start-ConsoleRecording
Opens a recorded child shell in a pseudo-console.
Syntax
Start-ConsoleRecording
[-Folder <String>]
[-Height <Int32>]
[-IdleLimit <Double>]
[-InProcess]
[-MaxBytes <Int64>]
[-Name <String>]
[-Path <String>]
[-Redact <String[]>]
[-RedactionText <String>]
[-Shell <String>]
[-TimeoutSeconds <Int32>]
[-Width <Int32>]
[<CommonParameters>]#Parameter set:
All Parameter SetsDescription
Records terminal output and resizes to local asciicast v2. Exit the child shell or run Stop-ConsoleRecording inside it to finalize. Input bytes are never stored; output secret patterns are redacted before writing. The title shows a REC indicator. Use -InProcess for explicitly limited PowerShell output capture when pseudo-consoles are unavailable.
Examples
Example 1
Start-ConsoleRecording -Path ./demo.cast -Name 'Deployment'Record a PowerShell session
Parameters
- -Folder String
- Folder for automatic cast names.
- -Height Int32
- Initial terminal height in cells.
- -IdleLimit Double
- Longest playback idle gap in seconds; zero keeps original timing.
- -InProcess SwitchParameter
- Explicit limited fallback: PowerShell host output in this process; no native terminal capture.
- -MaxBytes Int64
- Maximum cast bytes. At the cap recording stops with a warning.
- -Name String
- Recording title.
- -Path String
- Local asciicast v2 output; omitted names are timestamped.
- -Redact String[]
- Additional regular expressions to redact from recorded output.
- -RedactionText String
- Visible replacement for matched output (default [REDACTED]). No control characters.
- -Shell String
- Shell executable. The default is the current PowerShell executable.
- -TimeoutSeconds Int32
- Maximum child lifetime in seconds.
- -Width Int32
- Initial terminal width in cells.
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.