PS: Menu Driven Applications


So at some point or another you will be tasked to come up with a menu application either for yourself to launch your custom scripts or for helpdesk staff. Personally, this is one of my favorite things about my job is diving into Powershell and finding ways to implement it. That being said, this post will be script heavy, so I will place them in the bottom and talk about them towards the top.

Essentially, the three types of applications I have made with Powershell are either text driven menus, application menus, or just simple forms. I will go over each 3 here. Keep in mind you can go all out like this guy and really dig in!

To Resolve:

1a. The main thing you want to do is get a template like mine below and then add functions that will be called when the user makes a selection.

2. For example, to add an action to the GUI application you would write a function like I did on lines 47-50. Then just call the function with the click event on line 297.

3. For menu application I did the same thing on lines 605-608 and then called on line 628. I like this script a little more because it auto expands and has sub menu’s.


4. If you prefer a menu driven application, try the following:

Both of these can be found in the gwApplications section.