I needed a Windows script that would let me perform a variety of options for deploying a piece of software faster with a little menu to pick which task to perform. In the past I would’ve written this as a batch file using
goto statements to jump around for the different options I need, but now with PowerShell it can be a little more elegant:
Write-Host 'A Name for the Script'
Once the application starts each function will just call each other until you Ctrl+C to kill it. Of course you can put an option of ‘quit’ or ‘exit’ in, but I chose to omit that here for the sake of simplicity.