Skip to content
ConsoleMonster
Cmdlet

Show-ConsoleList

Module
ConsoleMonster
Inputs
System.Management.Automation.PSObject

Formats pipeline objects as record views (labelled values) and writes them to the host.

Syntax

Show-ConsoleList
[-AsString]
[-AsWidget]
[-Culture <CultureInfo>]
[-Depth <Int32>]
[-GroupBy <Object>]
[[-InputObject] <PSObject>]
[-PassThru]
[-Property <Object[]>]
[-ShowEmpty]
[-Title <Object>]
[-Width <Int32>]
[<CommonParameters>]
#
Parameter set: All Parameter Sets

Description

Each object becomes a section titled by its key column (the first property, or one marked Key = $true) with the other properties as aligned label/value fields; empty values are hidden unless -ShowEmpty is given. Values go through presenters (statuses, sizes, durations, dates...), and complex values (nested objects, collections) expand as indented sections and nested tables down to -Depth levels. -Property works like Format-List, including calculated properties and the column option keys of Show-ConsoleTable. Redirected output is plain text.

Examples

Example 1

Get-Process -Id $PID | Show-ConsoleList -Property Name, Id, @{ Name = 'WorkingSet64'; Presenter = 'Bytes' }, StartTime, Modules -Depth 1

A process as a record

Parameters

-AsString SwitchParameter optional
Writes the view as one string of plain text instead of drawing it, to keep it in a variable or a file from any script, function or PowerShell version. Without it, PowerShell 7.2+ captures a view typed at the prompt ($x = ..., > file, Out-File); inside scripts and functions, and on Windows PowerShell 5.1, the view is drawn on the screen. Piped into another command (Out-Host, Out-String, Select-String) the view goes on as plain lines, without colour. Cannot be combined with -PassThru.
-AsWidget SwitchParameter optional
Returns the record view without drawing it.
-Culture CultureInfo optional
The culture for numbers and dates, for example en-US or pl-PL (labels stay English). Defaults to CONSOLEMONSTER_CULTURE, then the current culture, as PowerShell's own formatting does.
-Depth Int32 optional
How many levels of nested objects expand (default 1; 0 shows nested values as text).
-GroupBy Object optional
Groups records under headings by a property name or a scriptblock.
-InputObject PSObject optionalposition: 0pipeline: True (ByValue)
The objects to show (pipeline input).
-PassThru SwitchParameter optional
Also writes the input objects to the pipeline.
-Property Object[] optional
Properties (names, wildcards, calculated properties and column option hashtables).
-ShowEmpty SwitchParameter optional
Shows empty values (hidden by default).
-Title Object optional
A title on the summary line (markup).
-Width Int32 optional
Lays the records out for this width instead of the terminal's.

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.