How to pause a powershell script – press enter to continue

So there are a few ways. If you just want “Press enter to continue” its:

Read-Host -Prompt “Press enter to continue”

Want something more fancy?

Write-Host “Press any key to continue …” $x = $host.UI.RawUI.ReadKey(“NoEcho,IncludeKeyDown”)

(Does NOT work in Powershell ISE) – Read host does. Check this thread for more info: