Bug Report - linking powershell 6.2.1 and 7.0.0 to Terminal side by side is not possible #2238

Closed
opened 2026-01-30 22:50:19 +00:00 by claunia · 5 comments
Owner

Originally created by @Karl-WE on GitHub (Jun 25, 2019).

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

Environment

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

Steps to reproduce

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
    },

Expected behavior

Terminal cannot - technically correct - distinguish between both pwsh.exe when both are added to Windows $env:path

Actual behavior

Terminal will not open PoSh 7.x due to this limitation

Originally created by @Karl-WE on GitHub (Jun 25, 2019). 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 # Environment 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 # Steps to reproduce 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 }, # Expected behavior Terminal cannot - technically correct - distinguish between both pwsh.exe when both are added to Windows $env:path # Actual behavior Terminal will not open PoSh 7.x due to this limitation
claunia added the Issue-QuestionArea-SettingsResolution-AnsweredProduct-Terminal labels 2026-01-30 22:50:20 +00:00
Author
Owner

@Shorotshishir commented on GitHub (Jun 25, 2019):

Did you try changing the guid? change a few letters of any, just don't keep them the same?

@Shorotshishir commented on GitHub (Jun 25, 2019): Did you try changing the `guid`? change a few letters of any, just don't keep them the same?
Author
Owner

@DHowett-MSFT commented on GitHub (Jun 25, 2019):

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.

@DHowett-MSFT commented on GitHub (Jun 25, 2019): 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.
Author
Owner

@Karl-WE commented on GitHub (Jun 27, 2019):

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.

@Karl-WE commented on GitHub (Jun 27, 2019): 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.
Author
Owner

@DHowett-MSFT commented on GitHub (Jun 27, 2019):

from powershell, type new-guid .. or run "guidgen", or just change one of the hex digits in the guid to another one

@DHowett-MSFT commented on GitHub (Jun 27, 2019): from powershell, type `new-guid` .. or run "guidgen", or just change one of the hex digits in the guid to another one
Author
Owner

@Karl-WE commented on GitHub (Jun 27, 2019):

Thank you!

@Karl-WE commented on GitHub (Jun 27, 2019): Thank you!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#2238