PoshCode Archive  Artifact [c66efbaec6]

Artifact c66efbaec6b151339bc0a44a2ae2ba9c8ddc9d34fed9d4e36154307dc49ca94a:

  • File Pause.ps1 — part of check-in [32e1ea0622] at 2018-06-10 13:24:09 on branch trunk — Function was originally posted by the PowerShell Team on 2007/02/25 @ http://blogs.msdn.com/b/powershell/archive/2007/02/25/pause.aspx (user: Vidrine size: 614)

# encoding: ascii
# api: powershell
# title: Pause
# description: Function was originally posted by the PowerShell Team on 2007/02/25 @ http://blogs.msdn.com/b/powershell/archive/2007/02/25/pause.aspx
# version: 0.1
# type: function
# author: Vidrine
# license: CC0
# x-poshcode-id: 3339
# x-archived: 2012-04-14T01:59:53
# x-published: 2012-04-10T11:34:00
#
# This function will simulate the ‘Pause’ feature of CMD.exe.
#
function Pause ($Message = "Press any key to continue...")
{
	Write-Host -NoNewline $Message
	$null = $Host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown")
	Write-Host ""
}