I have a ps1 script, in which I open multiple PowerShell windows with different commands on each window using this syntax:
$command = "myCommand"
Start-Process powershell.exe -ArgumentList "-NoExit", "-Command `"`$host.ui.RawUI.WindowTitle = '$windowTitle'; Write-Host $myCommand; $myCommand`""
The Start-Process command is being executed multiple times in a for-loop, as well as the command variable is being updated with a new command at each iteration.
The result is multiple PowerShell windows, as one can see here:
Is there any way to open these multiple windows in one window but with multiple tabs like this:
I didn’t find a way to do it, and I was wondering whether someone know a way to do it.