0

I am using Powershell ISE to leverage multiple tabbed interface to avoid having too many command prompt windows.

Now some of my batch scripts open up anew command line prompt. Is there a way to open this new command prompt window as a tab in powershell ISE?

For e.g. if I run my.bat prompt from a tab in powershell ISE, it runs the batch file in new command line prompt window rather than a new tab in Powershell ISE.

1

1 Answer 1

1

PS ISE will only run inline (console / script pane) code, .ps* files (consolehost/ISE/VSCode).

Cmd.exe .bat/.cmd, which requires shelling out to it, and there is no way around that. Nor is there any plan of record to make PS run non-ps* files that I am aware of or have ever been asked for on the PS GitHub. It's really not a use case for it.

If you are saying you want to run this and not show the cmd window, then minimize or hide that. Yet, popping a tab to run a .bat/.cmd is possible, but it will still pop that cmd windows, because it has to. You can runs cmd stuff and only have the results come back to the ISE console though.

The link pointed to just cover the better ways to run .bat, .cmd etc., from PS (console/ISE/VSCode)

If you want to avoid multiple standalone consoles windows open, it would be better to switch to VSCode as you can have the script pane to your .ps* scripts open and have multiple consoles open in the bottom of the pane, and switch between them as needed.

https://code.visualstudio.com/docs/editor/integrated-terminal

Something you cannot do in the ISE.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .