i am the funny
 

 I AM THE FUNNY!!!

Ok, so this is a fairly basic menu that you that just runs in the PowerShell window and runs as a function so you can keep using it until you quit.

Some things to note, you can add as many options as you want, you will just need to make sure that you add a corresponding switch in the switch statement.

The input options do not have to be numbers, it just makes it easier. If it is letter/s or a word, it is not case sensitive.

I'm not sure what else I need to say… have at it?

# Adding in the forms for a message box in option 3
[void][System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms")

Function Option2{
    Write-Host "You chose option 2"
    Pause
}

Function Show-Menu{
     param (
           [string]$Title = 'My Menu'
     )
     cls
     Write-Host "================ $Title ================"
     
     Write-Host "1: Press '1' Option 1."
     Write-Host "2: Press '2' Option 2."
     Write-Host "3: Press '3' Option 3."
     Write-Host "Q: Press 'Q' to quit."
}

do{
    Show-Menu
    $input = Read-Host "Please make a selection"
    Switch ($input) {
        "1" {
            Write-Host "You chose option 1"
            Pause
        }
        "2" {
           Option2
        }
        "3" {
            [System.Windows.Forms.MessageBox]::Show("Yay! You chose Option 3") 
        }
        # You don't really need to add an option for q here... but i wanted to
        "q" {
            Write-host "Quitting now"
            sleep -s 2
        }
    }
}until ($input -eq 'q')