PowerTip: Use PowerShell to Wait for a Key Press
Summary: Learn about the Windows PowerShell version of “Pause.”
How can I use Windows PowerShell to wait for a key in scripts like I used to use “Pause” in the command console?
Use the $Host variable in the console:
$HOST.UI.RawUI.ReadKey(“NoEcho,IncludeKeyDown”) | OUT-NULL