Write-Menu

-Title 'AppxPackages' -Sort -Entries (Get-AppxPackages).Name

AppxPackages

-Title 'AppxPackages' -Sort -MultiSelect -Entries (Get-AppxPackages).Name

AppxPackages

NOTE: The menu has been updated multiple times since capturing these screen-grabs, so they are no longer accurate...

Description

Outputs a command-line menu which can be navigated using the keyboard.

Parameters

Parameter Example
Required Entries (array) -Entries @('Entry 1', 'Entry 2', 'Entry 3')
Entries (hashtable) -Entries @{'Entry 1' = 'Write-Host "Command 1"'; 'Entry 2' = 'Write-Host "Command 2"'; 'Entry 3' = 'Write-Host "Command 3'"}
Optional Title -Title 'Example Title'
Optional Sort -Sort
Optional MultiSelect -MultiSelect

Examples

Example Description
AdvancedMenu Demonstrates all supported entry types (regular command + methods of adding a nested menu).
AppxPackages Uses Write-Menu to list app packages (Windows Store/Modern Apps)
CustomMenu Generates a custom menu by manually specifying each entry

Controls

Key Description
Up Previous entry
Down Next entry
Left / PageUp Previous page
Right / PageDown Next page
Home Jump to top
End Jump to bottom
Space -MultiSelect Select current
Insert -MultiSelect Select all
Delete -MultiSelect Select none
Enter Confirm selection
Esc / Backspace Exit / Previous menu