Dynamic menu system for PowerShell scripts used by helpdesk staff.
This provides a default main menu for your most frequently used scripts.
There is also a choice for an advanced menu, useful for scripts that are used less often or are resource intensive.
Create this script in a folder accessible to all those who need to use it.
Within the folder create 2 more folders: MainMenu
and Advanced
.
Copy or create all .ps1 files youd like to be accessible through this menu in either of the subfolders you created.
Call this script to load the main menu.
For helpdesk staff its advisable to have them create an alias to this in their PowerShell profile.
Any .ps1 files that contain the word "test" anywhere in their filename will not be displayed in the menu.
This is helpful if you want to test scripts where they will be living before making them available to users.
Though if you need to use the word test in your filename you can change it in the following line for the $mmFiles
and $advFiles
variables.
get-childItem $scripts\MainMenu | where {($_.name -like "*.ps1") -and (-not($_.basename -like "*test*"))}