新手
嗨
我有以下创建的power shell脚本。我想在完成每个开关的功能后返回到主菜单,我需要添加/更改什么?
[int]$UserMenu = 0
while ( $xUserMenu -lt 1 -or $xUserMenu -gt 4){
Write-host "1.Copy file based on keyword"
Write-host "2.Directory list export of directory"
Write-host "3.Exit"
[Int]$xUsermenu = read-host "Please enter an option" }
Switch( $xUsermenu ){
1{some function}
2{some function}
3{exit}
}