Q. How can I pause a PowerShell script until a user presses a key?
A. The two lines of PowerShell below will pause a script until the user presses (and does not have to release) a key.
Write-Host "Press any key to continue ....." $x = $host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown")