Skip to content
ConsoleMonster
Cmdlet

New-ConsoleTable

Module ConsoleMonster
Inputs
System.Management.Automation.PSObject[]
Outputs
ConsoleMonster.Widgets.Table

Creates a console table from pipeline objects.

Syntax

New-ConsoleTable [-Border <Rounded|Square|Double|Minimal>] [-Caption <Object>] [-Expand] [[-InputObject] <PSObject[]>] [-NoHeaderSeparator] [-Property <String[]>] [-StatusProperty <String>] [-Title <Object>] [<CommonParameters>]
#
Parameter set: All Parameter Sets

Description

Creates a console table from pipeline objects.

Columns come from -Property or from the first object's properties (or hashtable keys). Columns size to their content, numbers are right-aligned, long values wrap. A -StatusProperty column shows status markers (pass, fail, warn...) as the row's one colour signal.

Examples

Authored help example

EXAMPLE 1

New-ConsoleTable -Border 'Value'

Parameters

-Border TableBorder optional
Border: Rounded, Square, Double, Minimal or None.
Possible values: Rounded, Square, Double, Minimal
-Caption Object optional
A muted caption below the table.
-Expand SwitchParameter optional
Fill the available width (spare width goes to the widest text column).
-InputObject PSObject[] optionalposition: 0pipeline: True (ByValue)
The objects to show, one row each.
-NoHeaderSeparator SwitchParameter optional
Underline the header instead of drawing a separator row under it.
-Property String[] optional
Properties to show, in order.
-StatusProperty String optional
A property whose values are statuses (pass/fail/warn/skip/running).
-Title Object optional
A title above the table.

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.