depends on #754
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.



We should handle this as part of a powershell core dynamic profile generator!
Therefore, I am converting this issue to be the master task for "Switch PSCore to a dynamic profile generator".
@zadjii-msft - thoughts:
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 馃槣
I'm taking a crack at this!

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);
}
@stevel-msft quick questions I wanted to run by you, all related to powershell branding.
When we're generating automatic profiles for Powershell instances:
PowerShell or Powershell?PowerShell or PowerShell Core?assets\ will always be present in the powershell distribution directory?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:
@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.
From a branding perspective, I would suggest differentiating:
(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.

After doing this it doesn't appear in the list of profiles... Am I missing something?
Unless you鈥檙e running the latest internal-to-microsoft build that was released last night around midnight, you鈥檙e missing a version of Windows Terminal that actually has this feature in it 馃槄
(If you aren鈥檛: check the store for updates, then hit me back!)
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.

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

Well yes, again, this is because you鈥檙e 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.
Thank You All for your hard work! I love Windows Terminal.
:tada:This issue was addressed in #4273, which has now been successfully released as Windows Terminal Preview v0.9.433.0.:tada:
Handy links:
Most helpful comment
Well yes, again, this is because you鈥檙e 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.