Skip to content
ConsoleMonster
Cmdlet

New-ConsolePanel

Module ConsoleMonster
Inputs
ConsoleMonster.Layout.IWidget
Outputs
ConsoleMonster.Layout.IWidget

Creates a bordered panel with a title around other console widgets.

Syntax

New-ConsolePanel [-Border <Rounded|Single|Double|Heavy|Ascii>] [-Caption <Object>] [[-Content] <ScriptBlock>] [-Fill] [-Footer <Object>] [-Height <Int32>] [-Title <Object>] [-Weight <Double>] [-Widget <IWidget>] [<CommonParameters>]
#
Parameter set: All Parameter Sets

Description

Creates a bordered panel with a title around other console widgets.

The scriptblock emits the panel content (several widgets are stacked vertically). Borders follow the detected glyph tier: rounded on modern fonts, single lines on Consolas, +-| in ASCII mode. Inside New-ConsoleColumns, panels share the row height.

Examples

Authored help example

EXAMPLE 1

New-ConsolePanel -Border 'Value'

Parameters

-Border BoxStyle optional
Border style: Rounded, Single, Double, Heavy, Ascii or None.
Possible values: Rounded, Single, Double, Heavy, Ascii
-Caption Object optional
Text on the right of the top border, for example a count.
-Content ScriptBlock optionalposition: 0
Scriptblock that emits the panel content.
-Fill SwitchParameter optional
Take the remaining height of a live dashboard (for example a log).
Text on the right of the bottom border.
-Height Int32 optional
Fixed height in rows, including the border.
-Title Object optional
The title shown in the top border (Spectre-style markup allowed).
-Weight Double optional
Share of the width (in columns) or height (in a live dashboard) this panel takes.
-Widget IWidget optionalpipeline: True (ByValue)
A widget to use as content instead of a scriptblock.

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.