Cmdlet
New-ConsoleMenu
Creates a menu from items (New-ConsoleMenuItem) for Show-ConsoleMenu.
Syntax
Description
Creates a menu from items (New-ConsoleMenuItem) for Show-ConsoleMenu.
The scriptblock runs once and its New-ConsoleMenuItem output becomes the items, in order. A menu can be shown as an app (Shell: title bar with the breadcrumb, sidebar, content pane, key footer), a centred menu (Classic) or a list in the scrollback (Inline); the layout can be set here or on Show-ConsoleMenu.
Examples
EXAMPLE 1
New-ConsoleMenu -Title 'Value'Parameters
- -Content ScriptBlock
- A scriptblock whose New-ConsoleMenuItem output becomes the items.
- -Description String
- A sentence shown above the items.
- -Item MenuItem[]
- Items created beforehand.
- -Layout MenuLayout
- The default layout for Show-ConsoleMenu: Auto, Classic, Shell or Inline.
- Possible values:
Auto,Classic,Shell,Inline - -Subtitle String
- Muted text at the right of the footer (a version, an environment).
- -Title String
- The title (the app name for the top menu).
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.