选项菜单

$repeat=$true
do
{
    Write-Host "1 - MENU"
    Write-Host "2 - MOVE"
    Write-Host "3 - EXIT"
    [int]$selection=Read-Host "make your selection:"
    switch ($selection)
    {
        1{
        }
        2{
        }
        3{
            $repeat=$false
        }
    }
}
while ($repeat)
原文地址:https://www.cnblogs.com/feiyucha/p/12001784.html