Export-ConsoleFrame
Exports a widget, a rendered frame or a live-session snapshot to HTML, SVG or text.
Syntax
Export-ConsoleFrame [-FontSize <Double>] [-Format <Html|Svg|Text>] [-Height <Int32>] [-InputObject] <Object> [-PassThru] [[-Path] <String>] [-Theme <Auto|Dark|Light>] [-Title <String>] [-Width <Int32>] [-WindowChrome] [<CommonParameters>]#All Parameter SetsDescription
Exports a widget, a rendered frame or a live-session snapshot to HTML, SVG or text.
Pipe any New-Console* widget (or Format-ConsoleTable -AsWidget) and get a self-contained HTML page (inline CSS, selectable text, a dark and a light rendering that follow the viewer's prefers-color-scheme), an SVG image (box, block and braille characters drawn as shapes, selectable text, no external assets) or plain text. Cell geometry is kept exactly. OSC 8 links become links (web and mail links only; javascript: and other schemes are dropped). Other objects are shown as a table. Several widgets are stacked. Without -Path the document is written to the pipeline.
Examples
EXAMPLE 1
Export-ConsoleFrame -InputObject 'Value'Parameters
- -FontSize Double
- The font size in pixels (default 14).
- -Format String
- The format: Html, Svg or Text (default: from the -Path extension, else Html).
- Possible values:
Html,Svg,Text - -Height Int32
- Height in cells for widgets (default: as tall as the widget measures).
- -InputObject Object
- A widget, a rendered frame (CellBuffer), a live session, text, or objects to show as a table.
- -PassThru SwitchParameter
- With -Path, also writes the file to the pipeline.
- -Path String
- The file to write (UTF-8 without a byte order mark). Without it the document goes to the pipeline.
- -Theme ExportTheme
- Auto (both renderings, following the viewer), Dark or Light.
- Possible values:
Auto,Dark,Light - -Title String
- The page title and, with -WindowChrome, the title bar text.
- -Width Int32
- Width in cells for widgets (default 100).
- -WindowChrome SwitchParameter
- Draws a window frame with a title bar around the screen.
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.