Hi,
Newbie here.
I am creating a script to give our IT folks testing options but I am having difficulty showing a menu within a menu.
If the user select’s option # 2; I would like to show the user a new menu with different options to perform. Any input is appreciated. Thank you in advance.
function Show-MainMenu
{ param ( [string]$Title = 'IT Test' )
Clear-Host
Write-Host "================ $Title ================"
Write-Host "Select Type of Test:"
Write-Host "`n"
Write-Host "1: Server Mode"
Write-Host "2: Client Mode"
Write-Host "`n"
Write-Host "Q: Press 'Q' to quit."
Write-Host "`n" }
#
function ServerMode
{ Write-Host "Server Mode" }
function ClientMode
{ Write-Host "Client Mode" }
#
do { Show-MainMenu –Title 'IT Test' $input = Read-Host "Enter your Selection" switch ($input)
{ '1' { ServerMode }
'2' { ClientMode }
'q' { return } } pause }
until ($input -eq 'q')