Skip to content
ConsoleMonster
Cmdlet

Show-ConsoleMenu

Module ConsoleMonster
Inputs
ConsoleMonster.Interactive.Menu

Shows a menu until the user exits.

Syntax

Show-ConsoleMenu [-AppName <String>] [-Layout <Auto|Classic|Shell|Inline>] [-Menu] <Menu> [-Mode <Rich|Line|Accessible>] [-NoCommandPalette] [-RememberLastChoices] [-StorageRoot <String>] [<CommonParameters>]
#
Parameter set: All Parameter Sets

Description

Shows a menu until the user exits.

Shell is an app: a title bar with the breadcrumb, a sidebar (it folds into the breadcrumb in narrow windows), the content pane with the open item's list, form, page or review, and a footer generated from the keys that work right now. Classic is one centred menu; Inline is a list in the scrollback for scripts. Everywhere: Esc goes back, Ctrl+K (or :) opens the command palette, ? shows every key, Ctrl+Q leaves (asking first when a form has unsaved changes). Item actions run on the pipeline thread. Selections and form values survive navigation; -AppName stores presets, and with -RememberLastChoices the last choices.

Examples

Authored help example

EXAMPLE 1

Show-ConsoleMenu -Menu 'Value'

Parameters

-AppName String optional
The app name presets and remembered choices are stored under (default: the menu title).
-Layout MenuLayout optional
The layout: Auto (the menu's own, or Shell when items open content), Classic, Shell or Inline.
Possible values: Auto, Classic, Shell, Inline
-Menu Menu requiredposition: 0pipeline: True (ByValue)
The menu from New-ConsoleMenu.
-Mode InteractionMode optional
Forces how to interact: Rich, Line or Accessible.
Possible values: Rich, Line, Accessible
-NoCommandPalette SwitchParameter optional
Turns the command palette off.
-RememberLastChoices SwitchParameter optionalaliases: Remember
Remembers selections and form answers between runs.
-StorageRoot String optional
The folder that holds the app's storage folder (default: per user).

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.