PowerShell Tip: Prompt the User for a Key Press
How to prompt the user to type a particular key, and pause until that key is typed:
function Pause($Message)
{
Write-Host -NoNewLine $Message
do
{
$key = $Host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown")
} while ($key.Character -ne 'Q')
Write-Host
}
...
Pause "Script Finished. Press Q to quit."