For serious work in the Console, few utilities (if any) can match the prowess of Take Command. It’s not cheap, but for command line jockeys, the savings in time and errors are worth the price. Serious ...
Note: By default if you right click on a script to run it in PowerShell, once the script is done running, PowerShell will close automatically. This has nothing to do with the Exit command or anything ...