OK, I\'m losing it. PowerShell is annoying me. I\'d like a pause dialog to appear, and it won\'t.
PS W:\\>>> $host.UI.RawUI.ReadKey(\"NoEcho,Include
The solutions like cmd /c pause cause a new command interpreter to start and run in the background. Although acceptable in some cases, this isn't really ideal.
The solutions using Read-Host force the user to press Enter and are not really "any key".
This solution will give you a true "press any key to continue" interface and will not start a new interpreter, which will essentially mimic the original pause command.
Write-Host "Press any key to continue..."
[void][System.Console]::ReadKey($true)