Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

start-process in Powershell closes Window automatically after execution is complete

I find that if I start a process by start-process in powershell , the new window will be closed automatically after execution complete , is it possible to keep it waiting for my further command to close?

like image 588
yingzhox Avatar asked Oct 28 '12 13:10

yingzhox


People also ask

How do I stop PowerShell from auto closing?

Using Read-Host to keep PowerShell console openUsing the PowerShell Read-Host command at the end of the script ensure console windows stay open until you press enter button to end the program.

Why is Windows PowerShell opening and closing?

Hi Isaac, this is likely caused by a scheduled task, that tries to install a mal Chrome extension. If found, right click on this task and Delete, then restart your computer.

How do I keep shells open after script?

Global Fix: Change your registry key by adding the -NoExit switch to always leave the PowerShell Console window open after the script finishes running.


1 Answers

Try passing -noexit as a parameter to powershell.exe when you start it.

like image 164
Doug Finke Avatar answered Sep 19 '22 11:09

Doug Finke