Due to a technical limitation in Windows and limitation in profiles.json as described in #1617 it is not possible to use Terminal with 2 Powershell core versions side by side
Windows build number: 18362.x (1903)
Windows Terminal version (if applicable): 0.2.1715.0
Any other software?
Powershell 6.2.1 Core -
Installpath: C:\Program Files\PowerShell\6-preview
Executable: pwsh.exe
Powershell 7.0.0 Core preview -
Installpath C:\Program Files\PowerShell\7-preview
Executable: pwsh.exe
Install PoSh 6.2.1
in PoSh 6.2.1 run update-module (eventually set-executionpolicy remotesigned
Install PoSh 7.0.0 preview
iex "& { $(irm https://aka.ms/install-powershell.ps1) } -UseMSI -preview"
references:
https://www.thomasmaurer.ch/2019/03/how-to-install-and-update-powershell-6/
https://docs.microsoft.com/en-us/powershell/scripting/install/installing-powershell-core-on-windows?view=powershell-6
Add a new block in section "profiles" to profiles.json
{
"acrylicOpacity" : 0.75,
"closeOnExit" : true,
"colorScheme" : "Solarized Dark",
"commandline" : "pwsh.exe",
"cursorColor" : "#FFFFFF",
"cursorShape" : "bar",
"fontFace" : "Consolas",
"fontSize" : 12,
"guid" : "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
"historySize" : 9001,
"icon" : "ms-appx:///ProfileIcons/{61c54bbd-c2c6-5271-96e7-009a87ff44bf}.png",
"name" : "Windows PowerShell 6.2.1 Core",
"padding" : "5, 5, 5, 5",
"snapOnInput" : true,
"startingDirectory" : "%USERPROFILE%",
"useAcrylic" : true
},
{
"acrylicOpacity" : 0.75,
"closeOnExit" : true,
"colorScheme" : "Solarized Light",
"commandline" : "pwsh.exe",
"cursorColor" : "#FFFFFF",
"cursorShape" : "bar",
"fontFace" : "Consolas",
"fontSize" : 12,
"guid" : "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
"historySize" : 9001,
"icon" : "ms-appx:///ProfileIcons/{61c54bbd-c2c6-5271-96e7-009a87ff44bf}.png",
"name" : "Windows PowerShell 7.0.0 Core Preview",
"padding" : "5, 5, 5, 5",
"snapOnInput" : true,
"startingDirectory" : "%USERPROFILE%",
"useAcrylic" : true
},
Terminal cannot - technically correct - distinguish between both pwsh.exe when both are added to Windows $env:path
Terminal will not open PoSh 7.x due to this limitation
Did you try changing the guid? change a few letters of any, just don't keep them the same?
Just change the guid. Also, just set the commandline to the actual path to pwsh.exe? I don't get it. Just set the path to C:\program files . . ., but escaped properly for JSON.
I did try to name the exes differently. Did not work for me. probably due the same ID
@Shorotshishir
For the GUID, can it be anything or where do I get it from?
For the path thanks for clarifing this in #1617 JSON is not something I usually see / do.
from powershell, type new-guid .. or run "guidgen", or just change one of the hex digits in the guid to another one
Thank you!