Add additional PowerShell Core paths (preview, scoop, etc.) to dynamic profile generator #3215

Closed
opened 2026-01-30 23:15:58 +00:00 by claunia · 16 comments
Owner

Originally created by @MaximoTrinidad on GitHub (Aug 6, 2019).

Originally assigned to: @DHowett-MSFT on GitHub.

depends on #754


Description of the new feature/enhancement

To include PowerShell 7 Preview.2 in the list of consoles if is already installed in the system.

I got both PowerShell Core GA and Preview installed for some time. And, the last few updates of Windows Terminal, is not automatically showing in the console list.

WinTerm_01_2019-08-06_15-40-58

WinTerm_02_2019-08-06_15-40-58

WinTerm_03_2019-08-06_15-40-58

Originally created by @MaximoTrinidad on GitHub (Aug 6, 2019). Originally assigned to: @DHowett-MSFT on GitHub. depends on #754 --- # Description of the new feature/enhancement To include PowerShell 7 Preview.2 in the list of consoles if is already installed in the system. <!-- A clear and concise description of what the problem is that the new feature would solve. Describe why and how a user would use this new functionality (if applicable). --> I got both PowerShell Core GA and Preview installed for some time. And, the last few updates of Windows Terminal, is not automatically showing in the console list. ![WinTerm_01_2019-08-06_15-40-58](https://user-images.githubusercontent.com/19892435/62572919-d4eb3180-b862-11e9-9df7-c6555be24b9b.png) ![WinTerm_02_2019-08-06_15-40-58](https://user-images.githubusercontent.com/19892435/62572979-eaf8f200-b862-11e9-85cb-66534da67eb9.png) ![WinTerm_03_2019-08-06_15-40-58](https://user-images.githubusercontent.com/19892435/62572986-f1876980-b862-11e9-9913-ebeb12e146ef.png)
claunia added the Resolution-Fix-CommittedArea-SettingsIssue-TaskProduct-Terminal labels 2026-01-30 23:15:58 +00:00
Author
Owner

@DHowett-MSFT commented on GitHub (Aug 8, 2019):

We should handle this as part of a powershell core dynamic profile generator!

@DHowett-MSFT commented on GitHub (Aug 8, 2019): We should handle this as part of a powershell core dynamic profile generator!
Author
Owner

@DHowett-MSFT commented on GitHub (Aug 8, 2019):

Therefore, I am converting this issue to be the master task for "Switch PSCore to a dynamic profile generator".

@DHowett-MSFT commented on GitHub (Aug 8, 2019): Therefore, I am converting this issue to be the master task for "Switch PSCore to a dynamic profile generator".
Author
Owner

@DHowett-MSFT commented on GitHub (Sep 19, 2019):

@zadjii-msft - thoughts:

  • Should this stay open? If so:
    • Move out from 1909
    • Make it generate a bunch of different PSCore profiles
    • Add support for scoop?
    • integrate the preview icon, detect preview versions
    • make pscore {latest} the default version
@DHowett-MSFT commented on GitHub (Sep 19, 2019): @zadjii-msft - thoughts: * Should this stay open? If so: * Move out from 1909 * Make it generate a bunch of different PSCore profiles * Add support for scoop? * integrate the preview icon, detect preview versions * make pscore {latest} the default version
Author
Owner

@zadjii-msft commented on GitHub (Sep 19, 2019):

Eh, yea this should probably be re-purposed for those things.

Frankly I don't know enough about PSCore to implement preview, scoop, etc. support myself, but I'm sure that an enterprising community member could always update the PowershellCoreProfileGenerator if they wanted to add additional search locations 😜

@zadjii-msft commented on GitHub (Sep 19, 2019): Eh, yea this should probably be re-purposed for those things. Frankly I don't know enough about PSCore to implement preview, scoop, etc. support myself, but I'm sure that an enterprising community member could always update the `PowershellCoreProfileGenerator` if they wanted to add additional search locations 😜
Author
Owner

@DHowett-MSFT commented on GitHub (Sep 24, 2019):

I'm taking a crack at this!

image

@DHowett-MSFT commented on GitHub (Sep 24, 2019): I'm taking a crack at this! ![image](https://user-images.githubusercontent.com/14316954/65486133-8c122b00-de58-11e9-9ca7-e15d06676b16.png)
Author
Owner

@DHowett-MSFT commented on GitHub (Sep 24, 2019):

The "latest good" (determined by a sorting algorithm ;P) one gets the legacy "Powershell Core" GUID :)

        // Total sort order:
        // 6-preview (wow) < 6-preview (native) < 7-preview (native) < 6 (wow) < 6 (native) < 7 (native)
        uint8_t Radix() const
        {
            return (preview ? 0b00000000 : 0b10000000) | ((majorVersion - 6) << 4) | (nativeArchitecture ? 0b1000 : 0x0000);
        }
@DHowett-MSFT commented on GitHub (Sep 24, 2019): The "latest good" (determined by a sorting algorithm ;P) one gets the legacy "Powershell Core" GUID :) ```cpp // Total sort order: // 6-preview (wow) < 6-preview (native) < 7-preview (native) < 6 (wow) < 6 (native) < 7 (native) uint8_t Radix() const { return (preview ? 0b00000000 : 0b10000000) | ((majorVersion - 6) << 4) | (nativeArchitecture ? 0b1000 : 0x0000); } ```
Author
Owner

@DHowett-MSFT commented on GitHub (Sep 24, 2019):

@stevel-msft quick questions I wanted to run by you, all related to powershell branding.

When we're generating automatic profiles for Powershell instances:

  • Should we include any version numbers past the first? (6, 6.2, 6.2.3)
  • Should we use the casing PowerShell or Powershell?
  • Should we use the name PowerShell or PowerShell Core?
    • I've implemented it as follows:
      • 6.x = "PowerShell Core"
      • 7+ = "PowerShell"
  • Is it safe for us to assume that assets\ will always be present in the powershell distribution directory?
  • If the user has installed pwsh as a dotnet global tool, should we prefer that over or under the Program Files one?

Right now, my total global sort order is this:

7 (x64/arm64 native)
6 (x64/arm64 native)
6 (x86)
7-preview (x64/arm64 native)
6-preview (x64/arm64 native)
6-preview (x86)

I'm not sure where to slot "program files", "dotnet global" and "windows store" to the sort order. 😄

@DHowett-MSFT commented on GitHub (Sep 24, 2019): @stevel-msft quick questions I wanted to run by you, all related to powershell branding. When we're generating automatic profiles for Powershell instances: * Should we include any version numbers past the first? (6, 6.2, 6.2.3) * Should we use the casing `PowerShell` or `Powershell`? * Should we use the name `PowerShell` or `PowerShell Core`? * I've implemented it as follows: * 6.x = "PowerShell Core" * 7+ = "PowerShell" * Is it safe for us to assume that `assets\` will always be present in the powershell distribution directory? * If the user has installed pwsh as a dotnet global tool, should we prefer that _over_ or _under_ the Program Files one? Right now, my total global sort order is this: ``` 7 (x64/arm64 native) 6 (x64/arm64 native) 6 (x86) 7-preview (x64/arm64 native) 6-preview (x64/arm64 native) 6-preview (x86) ``` I'm not sure where to slot "program files", "dotnet global" and "windows store" to the sort order. :smile:
Author
Owner

@shanselman commented on GitHub (Sep 30, 2019):

@DHowett-MSFT Casing is "PowerShell" always. I wouldn't show version numbers. You're saying "Core" is dropped after 7 is released? I'd prefer the pwsh.exe that is first in the path.

@shanselman commented on GitHub (Sep 30, 2019): @DHowett-MSFT Casing is "PowerShell" always. I wouldn't show version numbers. You're saying "Core" is dropped after 7 is released? I'd prefer the pwsh.exe that is first in the path.
Author
Owner

@SteveL-MSFT commented on GitHub (Oct 2, 2019):

From a branding perspective, I would suggest differentiating:

  • PowerShell Core 6.1
  • PowerShell Core 6.2
  • PowerShell 7
  • PowerShell 7-Preview

(6.0 is out of support already)

I don't think 6.x-Preview is needed since we have stable releases of those and no more previews for 6.x ever.

@SteveL-MSFT commented on GitHub (Oct 2, 2019): From a branding perspective, I would suggest differentiating: - PowerShell Core 6.1 - PowerShell Core 6.2 - PowerShell 7 - PowerShell 7-Preview (6.0 is out of support already) I don't think 6.x-Preview is needed since we have stable releases of those and no more previews for 6.x ever.
Author
Owner

@davidfowl commented on GitHub (Jan 31, 2020):

image

After doing this it doesn't appear in the list of profiles... Am I missing something?

@davidfowl commented on GitHub (Jan 31, 2020): ![image](https://user-images.githubusercontent.com/95136/73536067-f411e880-43d9-11ea-9e1c-e46e61f1da2f.png) After doing this it doesn't appear in the list of profiles... Am I missing something?
Author
Owner

@DHowett-MSFT commented on GitHub (Jan 31, 2020):

Unless you’re running the latest internal-to-microsoft build that was released last night around midnight, you’re missing a version of Windows Terminal that actually has this feature in it 😅

@DHowett-MSFT commented on GitHub (Jan 31, 2020): Unless you’re running the latest internal-to-microsoft build that was released last night around midnight, you’re missing a version of Windows Terminal that actually has this feature in it 😅
Author
Owner

@DHowett-MSFT commented on GitHub (Jan 31, 2020):

(If you aren’t: check the store for updates, then hit me back!)

@DHowett-MSFT commented on GitHub (Jan 31, 2020): (If you aren’t: check the store for updates, then hit me back!)
Author
Owner

@MaximoTrinidad commented on GitHub (Feb 1, 2020):

Windows Terminal version 0.8.10261.0

My dilemma has been that I want to use Windows Terminal with both PowerShell GA and Preview versions. But it seems that I can't, as it only pick one of the installed version.

WinTerm_01_2020-02-01_15-20-06

If I remove the GA version, then it grabs the Preview:

WinTerm_02_2020-02-01_15-20-06

@MaximoTrinidad commented on GitHub (Feb 1, 2020): Windows Terminal version 0.8.10261.0 My dilemma has been that I want to use Windows Terminal with both PowerShell GA and Preview versions. But it seems that I can't, as it only pick one of the installed version. ![WinTerm_01_2020-02-01_15-20-06](https://user-images.githubusercontent.com/19892435/73598609-80bac480-4508-11ea-9e9a-61036afecb1b.png) If I remove the GA version, then it grabs the Preview: ![WinTerm_02_2020-02-01_15-20-06](https://user-images.githubusercontent.com/19892435/73598624-ad6edc00-4508-11ea-9adf-e18fa5b741b9.png)
Author
Owner

@DHowett-MSFT commented on GitHub (Feb 1, 2020):

Well yes, again, this is because you’re using a released version of Terminal that predates this feature being added and this bug being closed. That is how we handle all bugs in this repository: they are closed when the code change is made, and an announcement is posted when a release is available that contains the change.

@DHowett-MSFT commented on GitHub (Feb 1, 2020): Well yes, again, this is because you’re using a released version of Terminal that predates this feature being added and this bug being closed. That is how we handle all bugs in this repository: they are closed when the code change is made, and an announcement is posted when a release is available that contains the change.
Author
Owner

@MaximoTrinidad commented on GitHub (Feb 1, 2020):

Thank You All for your hard work! I love Windows Terminal.

@MaximoTrinidad commented on GitHub (Feb 1, 2020): Thank You All for your hard work! I love Windows Terminal.
Author
Owner

@ghost commented on GitHub (Feb 13, 2020):

:tada:This issue was addressed in #4273, which has now been successfully released as Windows Terminal Preview v0.9.433.0.🎉

Handy links:

@ghost commented on GitHub (Feb 13, 2020): :tada:This issue was addressed in #4273, which has now been successfully released as `Windows Terminal Preview v0.9.433.0`.:tada: Handy links: * [Release Notes](https://github.com/microsoft/terminal/releases/tag/v0.9.433.0) * [Store Download](https://www.microsoft.com/store/apps/9n0dx20hk701?cid=storebadge&ocid=badge)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#3215