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
I'm not aware of a command you could run in the script that would prevent the shell from exiting if it had not been invoked using the -noexit
command.
I typically use Read-Host "Press ENTER to continue"
at the end if I don't want the shell to close. However this won't prevent the shell from closing after you press enter if it had not been started with -noexit
.