Loading ...

How To Make Pause In Powershell Script Execution

Hello everybody,

today I want to make short note about how to make pause untill user press a key in PowerShell execution.

Here it is:

 

  Write-Host "Press any key to continue ..."

 $x = $host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown")

 

Presented code will make a pause.