PowerShell modules and scripts aren’t generally written with interactivity in mind. After all, automation is generally about hands-off activities. However, there are times when you might need to write a script for people less familiar with PowerShell. You could write a GUI for your script, but that can get complicated.
Fortunately, Microsoft PowerShell provides a way to build small, interactive menus inside a PowerShell script, allowing users to provide input quickly and easily. Here’s how it works.