Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Terminal no longer auto-generates a profile for PowerShell 7 when installed via winget. #18618

Closed
ninbura opened this issue Feb 24, 2025 · 11 comments
Labels
Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Resolution-External For issues that are outside this codebase

Comments

@ninbura
Copy link

ninbura commented Feb 24, 2025

Windows Terminal version

1.21.10351.0

Windows build number

Microsoft Windows NT 10.0.26100.0

Other Software

No response

Steps to reproduce

  1. install Windows 11
  2. open Windows Terminal
  3. install PowerShell 7 via winget
    • winget install Microsoft.PowerShell
  4. restart Windows Terminal
  5. observe that PowerShell 7 profile was not created

Expected Behavior

When PowerShell 7 is installed via winget, Microsoft Terminal should automatically generate a profile for it.

Actual Behavior

When PowerShell 7 is installed via winget, Microsoft Terminal does not generate a profile for it.

@ninbura ninbura added Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Feb 24, 2025
@ninbura
Copy link
Author

ninbura commented Feb 24, 2025

Another user reported this issue on the PowerShell GitHub repository 2 days ago (PowerShell/PowerShell#21289 (comment)). This was not an issue until recently, as it was working as expected only a few weeks ago.

@ninbura
Copy link
Author

ninbura commented Feb 24, 2025

When you Install PowerShell 7 via the releases section of the PowerShell repository a profile is generated.

The specific release I tested (PowerShell-7.5.0-win-x64.msi):
https://github.com/PowerShell/PowerShell/releases/tag/v7.5.0

@kastentop2005
Copy link

Hello. I reinstalled Windows and was surprised it doesn't do this anymore

@barndawgie
Copy link

Same thing for me. Just did a clean Windows install, then installed PowerShell from an elevated cmd.exe prompt using winget. When I open Terminal there is no profile added.

@mbrzakala
Copy link

I have the same problem — fresh Windows installation with PowerShell installed via winget.

There is a working workaround for this issue: you can simply add the following entry to your profiles list in settings.json:

{
    "commandline": "pwsh.exe",
    "guid": "{574e775e-4f2a-5b96-ac1e-a2962a402336}",
    "hidden": false,
    "name": "PowerShell"
}

The issue with finding PowerShell might be related to the changed name of the PowerShell package in winget (it used to be called PowerShell Core).

I also tried using a profile from my other computer, but it didn’t work. The profile in settings.json was:

{
        "guid": "{574e775e-4f2a-5b96-ac1e-a2962a402336}",
        "hidden": false,
        "name": "PowerShell",
        "source": "Windows.Terminal.PowershellCore"
}

It seems that Windows.Terminal.PowershellCore does not work for new installations of PowerShell using winget.

@StevenBucher98
Copy link

Related issue we are tracking in the PowerShell repo PowerShell/PowerShell#25068

@StevenBucher98
Copy link

@mbrzakala we merged a potential fix 2 hours ago, can you try to uninstall and reinstall via winget again and see if that works?

@ninbura
Copy link
Author

ninbura commented Feb 25, 2025

@mbrzakala we merged a potential fix 2 hours ago

Out of curiosity, was the fix to revert default installation via winget to the non-portable version?

@mbrzakala
Copy link

@StevenBucher98 After reinstalation everything works perfect. Thank you!

@mbrzakala
Copy link

@ninbura I've reinstalled both PowerShell and Windows Terminal using the built-in terminal in Visual Studio Code. I used the standard winget packages: Microsoft.PowerShell and Microsoft.WindowsTerminal

@carlos-zamora
Copy link
Member

@StevenBucher98 After reinstalation everything works perfect. Thank you!

@StevenBucher98 Thanks for looking into this! Closing as External!

@carlos-zamora carlos-zamora added the Resolution-External For issues that are outside this codebase label Feb 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Resolution-External For issues that are outside this codebase
Projects
None yet
Development

No branches or pull requests

6 participants