Show-ConsoleList
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>]#All Parameter SetsDescription
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 1A process as a record
Parameters
- -AsString SwitchParameter
- 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
- Returns the record view without drawing it.
- -Culture CultureInfo
- 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
- How many levels of nested objects expand (default 1; 0 shows nested values as text).
- -GroupBy Object
- Groups records under headings by a property name or a scriptblock.
- -InputObject PSObject
- The objects to show (pipeline input).
- -PassThru SwitchParameter
- Also writes the input objects to the pipeline.
- -Property Object[]
- Properties (names, wildcards, calculated properties and column option hashtables).
- -ShowEmpty SwitchParameter
- Shows empty values (hidden by default).
- -Title Object
- A title on the summary line (markup).
- -Width Int32
- 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.