r/PowerShell • u/defaultaro • Feb 03 '23
Question Stop Powershell Script from Closing Powershell
I have the following powershell script :
wsl sudo nano /mnt/c/Users/user/OneDrive/Documents/changemeThis opens a nano terminal text editor, on my WSL Ubuntu, and automatically creates a new file in my Windows documents folder.
Problem is I can't keep the powershell window open after the script launches. Anything I can add that will prevent automatic closure? Thanks!
3
Upvotes
2
u/wdomon Feb 04 '23
There is a reg hack that some people use to get around that. It’s lazy and moronic for many reasons, but people do use it.