Do you have favourite scripts that go forgotten?
Does your organisation have scripts that would be useful to frontline staff who are not comfortable with the command line?
This module uses a CSV file to make a graphical menu of PowerShell scripts.
It's easy to customise and fast to launch.
You can also add Windows programs and files to the menu.
Just a few minutes to setup and - click! click! - you're away!
Try it out
Looking for a step-by-step introduction? See this blog post.
Install from the PowerShell Gallery
Install-Module PSScriptMenuGui -Scope CurrentUser New-ScriptMenuGuiExample cd PSScriptMenuGui_example .\PSScriptMenuGui.ps1
Clone from GitHub
git clone https://github.com/weebsnore/PowerShell-Script-Menu-Gui cd PowerShell-Script-Menu-Gui\PSScriptMenuGui\examples .\PSScriptMenuGui.ps1
Problems and feedback
How are you finding the module? Is it useful? (Please share a screenshot!)
Are you stuck? Do you want a feature?
Please open a GitHub issue or get in touch.
- Tested with PowerShell 5.1 x64 and PowerShell 7 Preview 5 x64 on Windows 10.
- Works in VS Code with PowerShell 7 only when using the PowerShell Preview extension.
Show-ScriptMenuGui -csvPath '.\example_data.csv' -Verbose
|Parameter||What is it?|
||Path to CSV file that defines the menu. See CSV reference, below.|
||Custom title for the menu window|
||Custom button foreground (text) color. Hex codes (e.g.
||Custom button background color|
||Path to .ico file for use in menu|
||Hide the PowerShell console that the menu is called from. Note: This means you won't be able to see any errors from button clicks. If things aren't working, this should be the first thing you stop using.|
||Start all PowerShell instances with
PSScriptMenuGui_all_options.ps1 for an example using every option.
This table details how to lay out the CSV file for your menu.
The top row of your CSV should contain the column headers. Each row after this defines a menu item.
|Column header||What is it?|
|Section (optional)||Text for heading|
|Method||What happens when you click the button? Valid options:
|Command||Path to target script/executable (
|Arguments (optional)||Arguments to pass to target executable (
|Name||Text for button|
|Description (optional)||Text for description|
||Example 2: cmd||External executable|
||Example 3: cmd||External executable with arguments|
||Example 4: powershell_file||.ps1 file called with powershell.exe|
||Example 6: powershell_inline||Additional powershell.exe arguments|
||Example 7: pwsh_file||.ps1 file called with pwsh.exe|
||Example 9: pwsh_inline||.ps1 file called with parameter|
example_data.csv for further examples in CSV format.
- Relative paths, network paths and paths in your environment should work.
<LineBreak />is supported in text fields.
- You can add multiple
_inlinecommands by separating with a semi-colon (
- Excel makes a good editor!
- But watch out for Excel turning e.g.
-NoExitinto a formula. Best workaround is to prefix with a space.