Stop Powershell from exiting

后端 未结 8 1874
傲寒
傲寒 2021-02-05 06:01

I know that there is that little -noexit switch for PowerShell.

Is there anyway of staying in the shell without using that switch?

In other words, I

8条回答
  •  死守一世寂寞
    2021-02-05 06:44

    Have you tried

    $host.enternestedprompt()
    

    That will stop execution and drop them to a nested prompt. When they exit that prompt, then the script will finish and the window will close.

提交回复
热议问题