Hello! Menu? what you use can that be?
Well to be honest there could be a lot use if you know how to use it like you could have a massive set of functions on your script which is not in order and menu comes in place to put beautifully presentable and easy to navigate even for an end user by simply select number on the menu
saying of Menu reminded me to share the below script on how you can create a menu in powershell
Function Show-Menu {
$menu="Menu Heading `n" +`
"1 `t Title 1 `n" +`
"2 `t Title 2`n" +`
"3 `t Title 3 `n" +`
"Q `t Title 4 `n" +`
"Select a menu choice"
$rc=Read-Host $menu
write $rc
}
Do {
Switch (Show-Menu) {
"1" {Write-Host "Code 1"}
"2" {Write-Host "Code 2"}
"3" {Write-Host "Code 3"}
"Q" {Write-Host "Code 4"}
}
} While ($True)
Let me know if you need a custom menu script created 😉
