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
$HOST.UI.RawUI.Flushinputbuffer()
0 comments