Skip to content
ConsoleMonster
Cmdlet

Show-ConsoleGrid

Module ConsoleMonster
Inputs
System.Management.Automation.PSObject
Outputs
System.Object

Shows pipeline objects in an interactive grid and returns the rows you choose.

Syntax

Show-ConsoleGrid [-Culture <CultureInfo>] [-Descending] [-Filter <String>] [-Hide <String[]>] [-InputObject <PSObject>] [-Mode <Rich|Line|Accessible>] [-OutputMode <Single|Multiple>] [[-Property] <Object[]>] [-SortBy <String>] [-Title <String>] [<CommonParameters>]
#
Parameter set: All Parameter Sets

Description

Shows pipeline objects in an interactive grid and returns the rows you choose.

An Out-GridView for the console, on Windows PowerShell 5.1 and PowerShell 7. Typing filters the rows (every word must appear in a shown column); Up/Down, PgUp/PgDn and Ctrl+Home/Ctrl+End move; F3 sorts by the next column (Shift+F3 the previous one) and F4 reverses the order; Space marks rows (Ctrl+A marks all shown rows); Enter shows the focused row with every column; F2 chooses the columns; Ctrl+Enter (or F10) returns the marked rows, or the focused row when none is marked; Esc clears the filter, then cancels. Columns come from -Property with the same options as Format-ConsoleTable (presenters, priorities, widths, tone rules); the original objects are returned. The screen has the same header bar, panel and footer as menus and forms. In line mode the rows are a numbered list; without an interactive user the cmdlet fails with a clear error.

Examples

Authored help example

EXAMPLE 1

Show-ConsoleGrid -Culture 'Value'

Parameters

-Culture CultureInfo optional
The culture for numbers and dates (default CONSOLEMONSTER_CULTURE, then the current culture).
-Descending SwitchParameter optional
Sorts descending at the start.
-Filter String optional
The filter to start with.
-Hide String[] optional
Columns hidden at the start (F2 shows them again).
-InputObject PSObject optionalpipeline: True (ByValue)
The objects to show (pipeline input).
-Mode InteractionMode optional
Forces how to ask: Rich (the grid), Line or Accessible (a numbered list), or None (fail without a user).
Possible values: Rich, Line, Accessible
-OutputMode GridSelection optional
What is returned: Multiple (default; the marked rows or the focused row), Single (the focused row) or None (browse only).
Possible values: Single, Multiple
-Property Object[] optionalposition: 0
Columns: names, wildcards and calculated properties with the Format-ConsoleTable column options.
-SortBy String optional
The column to sort by at the start.
-Title String optional
The title in the header bar (default Grid).

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.