Skip to content
ConsoleMonster
Cmdlet

Export-ConsoleFrame

Module ConsoleMonster
Inputs
System.Object
Outputs
System.String System.IO.FileInfo

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>]
#
Parameter set: All Parameter Sets

Description

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

Authored help example

EXAMPLE 1

Export-ConsoleFrame -InputObject 'Value'

Parameters

-FontSize Double optional
The font size in pixels (default 14).
-Format String optional
The format: Html, Svg or Text (default: from the -Path extension, else Html).
Possible values: Html, Svg, Text
-Height Int32 optional
Height in cells for widgets (default: as tall as the widget measures).
-InputObject Object requiredposition: 0pipeline: True (ByValue)
A widget, a rendered frame (CellBuffer), a live session, text, or objects to show as a table.
-PassThru SwitchParameter optional
With -Path, also writes the file to the pipeline.
-Path String optionalposition: 1
The file to write (UTF-8 without a byte order mark). Without it the document goes to the pipeline.
-Theme ExportTheme optional
Auto (both renderings, following the viewer), Dark or Light.
Possible values: Auto, Dark, Light
-Title String optional
The page title and, with -WindowChrome, the title bar text.
-Width Int32 optional
Width in cells for widgets (default 100).
-WindowChrome SwitchParameter optional
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.