How To Make Pause In Powershell Script Execution

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.

No Comments

Add a Comment
Comments are closed