Has anyone assembled i.e. a dozen PowerShell scripts, loaded as a Function that when run, generates a Menu of all of those scripts that can then be run by the engineer?
I assume you want to have the choice to run one of the scripts - not all of them, right? You could create an index for all scripts, output the list of scripts along with their index and prompt for the index of the script to run.
See the function Write-TextMenu from my module PoshFunctions on PowerShellGallery.com. You can pass an array of options to be in the menu and it will spit out the code that is the menu.
PoshFuntions is the name of the module - not a cmdlet. You should run “Get-Command -Module PoshFunctions” to get a list of the cmdlets available in this module
In my prior post I mentioned to look at the function Write-TextMenu. That function is the one in the module that is most appropriate to what you asked about.