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: https://stackoverflow.com/questions/3963100/how-do-you-do-a-pause-with-powershell-2-0