Prompt user
less than a minute
read-host
$GroupName = Read-Host -Prompt "Please enter group name"
Any key to continue
Write-Host -NoNewLine 'Press any key to continue...';
$null = $Host.UI.RawUI.ReadKey('NoEcho,IncludeKeyDown');
Choose
function Get-Site
{
$site=Read-Host "Choose a site code"
Switch ($site)
{
L {$Chosensite="London"}
H {$Chosensite="Hong Kong"}
N {$Chosensite="New York"}
}
return $Chosensite
}
Get-Site
Last modified July 21, 2024: update (e2ae86c)