Terminal doesn't generate PowerShell 7 profile #12156

Closed
opened 2026-01-31 03:07:37 +00:00 by claunia · 13 comments
Owner

Originally created by @akefirad on GitHub (Jan 23, 2021).

Environment

Windows build number: 10.0.19042.0
Windows Terminal version (if applicable): 1.4.3242.0

PowerShell: 7.1.1

Steps to reproduce

Note: probably this is specific to my system. I don't expect it to be easily reproducible. Please guide me on how to dig deeper.
At some point, I found that "PowerShell Core" profile is gone on Terminal (even though settings.json has the profile).
I uninstalled/reinstalled both Terminal and PowerShell, but it didn't solve the issue. As matter of fact, with new installation, Terminal doesn't have PowerShell Core profile (with source Windows.Terminal.PowershellCore).
I also tried to add it manually to settings.json, but it didn't help either. (I'm not quite sure if I understand guid field properly, is it some specific value or a random one that I can regenerate?):

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

For the record, everything in settings.json (e.g. hide profiles) works just fine.

Expected behavior

As the documentation say, Terminal should automatically generate PowerShell Core profile.

Actual behavior

Terminal doesn't generate PowerShell Core profile.

Originally created by @akefirad on GitHub (Jan 23, 2021). # Environment ```none Windows build number: 10.0.19042.0 Windows Terminal version (if applicable): 1.4.3242.0 PowerShell: 7.1.1 ``` # Steps to reproduce Note: probably this is specific to my system. I don't expect it to be easily reproducible. Please guide me on how to dig deeper. At some point, I found that "PowerShell Core" profile is gone on Terminal (even though `settings.json` has the profile). I uninstalled/reinstalled both Terminal and PowerShell, but it didn't solve the issue. As matter of fact, with new installation, Terminal doesn't have `PowerShell Core` profile (with source `Windows.Terminal.PowershellCore`). I also tried to add it manually to `settings.json`, but it didn't help either. (I'm not quite sure if I understand `guid` field properly, is it some specific value or a random one that I can regenerate?): ```json { "guid": "{574e775e-4f2a-5b96-ac1e-a2962a402336}", "name": "PowerShell Core", "source": "Windows.Terminal.PowershellCore", "hidden": false } ``` For the record, everything in `settings.json` (e.g. hide profiles) works just fine. # Expected behavior As the documentation say, Terminal should automatically generate `PowerShell Core` profile. # Actual behavior Terminal doesn't generate `PowerShell Core` profile.
claunia added the Needs-TriageNeeds-Tag-FixNeeds-Attention labels 2026-01-31 03:07:38 +00:00
Author
Owner

@DHowett commented on GitHub (Jan 23, 2021):

Where did you install PowerShell?

@DHowett commented on GitHub (Jan 23, 2021): Where did you install PowerShell?
Author
Owner

@DHowett commented on GitHub (Jan 23, 2021):

(And with what installation method?)

@DHowett commented on GitHub (Jan 23, 2021): (And with what installation method?)
Author
Owner

@akefirad commented on GitHub (Jan 23, 2021):

Ah good point, forgot to mention. Due to problems with spaces in the default installation path, I installed it in C:\Programs\. I downloaded the msi installer ftom the release page.

@akefirad commented on GitHub (Jan 23, 2021): Ah good point, forgot to mention. Due to problems with spaces in the default installation path, I installed it in `C:\Programs\`. I downloaded the msi installer ftom the release page.
Author
Owner

@DHowett commented on GitHub (Jan 23, 2021):

Ah.

Terminal detects installations of powershell in the typical places. You can safely create your own profile for it, just set a commandline and omit the source (the presence of a “source” property means that you aren’t the creator of that profile, so Terminal will hide it if it can’t figure out what it is).

As an aside ... what problems did you have with spaces in the default path? I suspect that it’s the default because it works well for almost all use cases, so I’m somewhat surprised.

@DHowett commented on GitHub (Jan 23, 2021): Ah. Terminal detects installations of powershell in the typical places. You can safely create your own profile for it, just set a commandline and _omit the `source`_ (the presence of a “source” property means that you aren’t the creator of that profile, so Terminal will hide it if it can’t figure out what it is). As an aside ... what problems did you have with spaces in the default path? I suspect that it’s the default _because it works well for almost all use cases_, so I’m somewhat surprised.
Author
Owner

@DHowett commented on GitHub (Jan 23, 2021):

The guid can be made up or totally omitted at your leisure. We’re reducing the number of times you have to see it or care about it with every release.

@DHowett commented on GitHub (Jan 23, 2021): The guid can be made up or totally omitted at your leisure. We’re reducing the number of times you have to see it or care about it with every release.
Author
Owner

@akefirad commented on GitHub (Jan 23, 2021):

I see. Got it. Thanks. About the problem with spaces, I tried to setup ssh ProxyCommand and couldn't figure out how to do it with the default path which has spaces. The catch is OpenSSH requires the full path to the command (in this case pwsh.exe. Does that make sense?

@akefirad commented on GitHub (Jan 23, 2021): I see. Got it. Thanks. About the problem with spaces, I tried to setup ssh ProxyCommand and couldn't figure out how to do it with the default path which has spaces. The catch is OpenSSH requires the full path to the command (in this case `pwsh.exe`. Does that make sense?
Author
Owner

@WSLUser commented on GitHub (Feb 1, 2021):

You have to use quotes around the file path, PSReadline will help you navigate with the tab button to get it to successfully quote it.

@WSLUser commented on GitHub (Feb 1, 2021): You have to use quotes around the file path, PSReadline will help you navigate with the tab button to get it to successfully quote it.
Author
Owner

@akefirad commented on GitHub (Feb 1, 2021):

I'm setting the path in .ssh/config file. And quotes didn't help, at least I couldn't get it working.

@akefirad commented on GitHub (Feb 1, 2021): I'm setting the path in `.ssh/config` file. And quotes didn't help, at least I couldn't get it working.
Author
Owner

@WSLUser commented on GitHub (Feb 4, 2021):

https://docs.microsoft.com/en-us/windows-server/administration/openssh/openssh_server_configuration should help you. Also C:\Program Files\OpenSSH\ is the default path for stand-alone installations (Chocolatey also honors this path during install.)

@WSLUser commented on GitHub (Feb 4, 2021): https://docs.microsoft.com/en-us/windows-server/administration/openssh/openssh_server_configuration should help you. Also `C:\Program Files\OpenSSH\` is the default path for stand-alone installations (Chocolatey also honors this path during install.)
Author
Owner

@akefirad commented on GitHub (Feb 4, 2021):

ProxyCommand is a client configuration thing. I'm not sure what should I read from the link (it's about server configuration). What I was trying to do is to configure the ProxyCommand of my .ssh/config (client). Something like this:

ProxyCommand ssh proxyserver -W [%h]:%p

Apparently the above has a problem; ssh must be absolute path (whatever the path of ssh is). I learned that whatever command is used, the path must be absolute on Windows. And I wanted to use pwsh.exe and the default path contains some space. Now the question is what's the correct way to configure the ProxyCommand with a command that has space in its absolute path (I forgot the exact path, I'm not on my Windows machine atm):

ProxyCommand C:\\Program Files\\PowerShell\\7.0.0\pwsh.exe blah blah blah # this doesn't work!
@akefirad commented on GitHub (Feb 4, 2021): `ProxyCommand` is a client configuration thing. I'm not sure what should I read from the link (it's about server configuration). What I was trying to do is to configure the `ProxyCommand` of my `.ssh/config` (client). Something like this: ``` ProxyCommand ssh proxyserver -W [%h]:%p ``` Apparently the above has a problem; `ssh` must be absolute path (whatever the path of `ssh` is). I learned that whatever command is used, the path must be absolute on Windows. And I wanted to use `pwsh.exe` and the default path contains some space. Now the question is what's the correct way to configure the `ProxyCommand` with a command that has space in its absolute path (I forgot the exact path, I'm not on my Windows machine atm): ``` ProxyCommand C:\\Program Files\\PowerShell\\7.0.0\pwsh.exe blah blah blah # this doesn't work! ```
Author
Owner

@WSLUser commented on GitHub (Feb 9, 2021):

the path must be absolute on Windows.

That sounds like you didn't set up the env var for ssh (though if adding the absolute path helps the config work, then keep it). You'd find that without the env var being set, you'd be unable to run ssh from any other directory except directly where the exe exists.

@WSLUser commented on GitHub (Feb 9, 2021): > the path must be absolute on Windows. That sounds like you didn't set up the env var for ssh (though if adding the absolute path helps the config work, then keep it). You'd find that without the env var being set, you'd be unable to run ssh from any other directory except directly where the exe exists.
Author
Owner

@akefirad commented on GitHub (Feb 15, 2021):

I don't quite remember. If I'm not mistaken it was an issue that could be solved only by using absolute paths. Anyway. Thanks for the support.

@akefirad commented on GitHub (Feb 15, 2021): I don't quite remember. If I'm not mistaken it was an issue that could be solved only by using absolute paths. Anyway. Thanks for the support.
Author
Owner

@wngtk commented on GitHub (Mar 30, 2023):

I have the same problem with you. but I fixed it through reset my settings.

delete your settings.json file

https://learn.microsoft.com/en-us/windows/terminal/troubleshooting#how-do-i-reset-my-settings-in-windows-terminal-back-to-the-default-settings

@wngtk commented on GitHub (Mar 30, 2023): I have the same problem with you. but I fixed it through reset my settings. > delete your [settings.json file](https://learn.microsoft.com/en-us/windows/terminal/install#settings-json-file) https://learn.microsoft.com/en-us/windows/terminal/troubleshooting#how-do-i-reset-my-settings-in-windows-terminal-back-to-the-default-settings
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#12156