Sysadminsblog.com Anything for sysadmins!

27Sep/100

Pausing PowerShell

Ever wondered how to use the pause function of DOS in PowerShell. Look no more. Here’s the script to do this:

[Powershell]Write-Host “Press any key to continue …”

$x = $host.UI.RawUI.ReadKey(“NoEcho,IncludeKeyDown”)[/PowerShell]

More info here: http://technet.microsoft.com/en-us/library/ff730957.aspx

Be Sociable, Share!

Posted by Mischa Oudhof

Comments (0) Trackbacks (0)

No comments yet.


Leave a comment

No trackbacks yet.