Profile is being auto updated with PowerShellCore #6372

Open
opened 2026-01-31 00:36:56 +00:00 by claunia · 0 comments
Owner

Originally created by @wsmelton on GitHub (Feb 11, 2020).

Environment

Platform ServicePack Version      VersionString
-------- ----------- -------      -------------
 Win32NT             10.0.18362.0 Microsoft Windows NT 10.0.18362.0
Windows Terminal version (if applicable): Version: 0.8.10261.0

Steps to reproduce

  1. Using the new profile.json format, open it up in VS Code or I'm using Visual Studio 2019 CE
  2. Remove the block below from the list[] :
,
        {
            "guid": "{574e775e-4f2a-5b96-ac1e-a2962a402336}",
            "hidden": false,
            "name": "PowerShell Core",
            "source": "Windows.Terminal.PowershellCore"
        }
  1. Save the file
  2. The removed block reappears at the end of the list[].

Expected behavior

The ability to add PowerShell 6 and PowerShell 7 to my Terminal.

Actual behavior

The block I remove for Windows.Terminal.PowerShellCore continues to be added back, and the entries I have for PowerShell 6 and 7 seem to be ignored.

I am trying to add the following to my profile in order to get PowerShell 6 and 7 in my terminal session:

"list": [
      {
        "guid": "{34fa1a1d-ed51-448e-a053-62d840dfceac}",
        "name": "PowerShell 7",
        "tabTitle": "PowerShell 7",
        "suppressApplicationTitle": "true",
        "source": "C:\\Program Files\\PowerShell\\7-preview\\pwsh.exe"
      },
      {
        "guid": "{574e775e-4f2a-5b96-ac1e-a2962a402336}",
        "name": "PowerShell 6",
        "tabTitle": "PowerShell 6",
        "suppressApplicationTitle": "true",
        //        "source": "Windows.Terminal.PowershellCore"
        "source": "C:\\Program Files\\PowerShell\\6\\pwsh.exe"
      },
      {
        "guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
        "name": "Windows PowerShell",
        "commandline": "powershell.exe"
      },
      {
        "guid": "{bd3ec972-9de6-4e4a-a353-62d035770223}",
        "name": "Anaconda PowerShell",
        "commandline": "powershell.exe -ExecutionPolicy ByPass -NoExit -Command \"& \"$env:LOCALAPPDATA\\Continuum\\anaconda3\\shell\\condabin\\conda-hook.ps1\" ; conda activate \"$env:LOCALAPPDATA\\Continuum\\anaconda3\" ",
        "startingDirectory": "%USERPROFILE%",
        "icon": "%LOCALAPPDATA%\\Continuum\\anaconda3\\Menu\\anaconda-navigator.ico"
      },
      {
        "guid": "{58ad8b0c-3ef8-5f4d-bc6f-13e4c00f2530}",
        "name": "Debian",
        "source": "Windows.Terminal.Wsl"
      },
      {
        "guid": "{b453ae62-4e3d-5e58-b989-0a998ec441b8}",
        "hidden": false,
        "name": "Azure Cloud Shell",
        "source": "Windows.Terminal.Azure"
      }
    ]
  },

However ever time I save the changes the contents are being changed to this (notice the last item:

"list": [
      {
        "guid": "{34fa1a1d-ed51-448e-a053-62d840dfceac}",
        "name": "PowerShell 7",
        "tabTitle": "PowerShell 7",
        "suppressApplicationTitle": "true",
        "source": "C:\\Program Files\\PowerShell\\7-preview\\pwsh.exe"
      },
      {
        "guid": "{574e775e-4f2a-5b96-ac1e-a2962a402336}",
        "name": "PowerShell 6",
        "tabTitle": "PowerShell 6",
        "suppressApplicationTitle": "true",
        //        "source": "Windows.Terminal.PowershellCore"
        "source": "C:\\Program Files\\PowerShell\\6\\pwsh.exe"
      },
      {
        "guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
        "name": "Windows PowerShell",
        "commandline": "powershell.exe"
      },
      {
        "guid": "{bd3ec972-9de6-4e4a-a353-62d035770223}",
        "name": "Anaconda PowerShell",
        "commandline": "powershell.exe -ExecutionPolicy ByPass -NoExit -Command \"& \"$env:LOCALAPPDATA\\Continuum\\anaconda3\\shell\\condabin\\conda-hook.ps1\" ; conda activate \"$env:LOCALAPPDATA\\Continuum\\anaconda3\" ",
        "startingDirectory": "%USERPROFILE%",
        "icon": "%LOCALAPPDATA%\\Continuum\\anaconda3\\Menu\\anaconda-navigator.ico"
      },
      {
        "guid": "{58ad8b0c-3ef8-5f4d-bc6f-13e4c00f2530}",
        "name": "Debian",
        "source": "Windows.Terminal.Wsl"
      },
      {
        "guid": "{b453ae62-4e3d-5e58-b989-0a998ec441b8}",
        "hidden": false,
        "name": "Azure Cloud Shell",
        "source": "Windows.Terminal.Azure"
      },
        {
            "guid": "{574e775e-4f2a-5b96-ac1e-a2962a402336}",
            "hidden": false,
            "name": "PowerShell Core",
            "source": "Windows.Terminal.PowershellCore"
        }
    ]
  },

I may be doing something wrong, but I have not been able to determine what it is.

For those that want to see this in action:

profiles_json_terminal

Originally created by @wsmelton on GitHub (Feb 11, 2020). <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING: 1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement. 2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement. 3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number). 4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement. 5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement. All good? Then proceed! --> <!-- This bug tracker is monitored by Windows Terminal development team and other technical folks. **Important: When reporting BSODs or security issues, DO NOT attach memory dumps, logs, or traces to Github issues**. Instead, send dumps/traces to secure@microsoft.com, referencing this GitHub issue. If this is an application crash, please also provide a Feedback Hub submission link so we can find your diagnostic data on the backend. Use the category "Apps > Windows Terminal (Preview)" and choose "Share My Feedback" after submission to get the link. Please use this form and describe your issue, concisely but precisely, with as much detail as possible. --> # Environment ```none Platform ServicePack Version VersionString -------- ----------- ------- ------------- Win32NT 10.0.18362.0 Microsoft Windows NT 10.0.18362.0 Windows Terminal version (if applicable): Version: 0.8.10261.0 ``` # Steps to reproduce 1. Using the new profile.json format, open it up in VS Code or I'm using Visual Studio 2019 CE 2. Remove the block below from the `list[]` : ``` , { "guid": "{574e775e-4f2a-5b96-ac1e-a2962a402336}", "hidden": false, "name": "PowerShell Core", "source": "Windows.Terminal.PowershellCore" } ``` 3. Save the file 4. The removed block reappears at the end of the `list[]`. # Expected behavior The ability to add PowerShell 6 and PowerShell 7 to my Terminal. # Actual behavior The block I remove for `Windows.Terminal.PowerShellCore` continues to be added back, and the entries I have for PowerShell 6 and 7 seem to be ignored. <!-- What's actually happening? --> I am trying to add the following to my profile in order to get PowerShell 6 and 7 in my terminal session: ``` "list": [ { "guid": "{34fa1a1d-ed51-448e-a053-62d840dfceac}", "name": "PowerShell 7", "tabTitle": "PowerShell 7", "suppressApplicationTitle": "true", "source": "C:\\Program Files\\PowerShell\\7-preview\\pwsh.exe" }, { "guid": "{574e775e-4f2a-5b96-ac1e-a2962a402336}", "name": "PowerShell 6", "tabTitle": "PowerShell 6", "suppressApplicationTitle": "true", // "source": "Windows.Terminal.PowershellCore" "source": "C:\\Program Files\\PowerShell\\6\\pwsh.exe" }, { "guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}", "name": "Windows PowerShell", "commandline": "powershell.exe" }, { "guid": "{bd3ec972-9de6-4e4a-a353-62d035770223}", "name": "Anaconda PowerShell", "commandline": "powershell.exe -ExecutionPolicy ByPass -NoExit -Command \"& \"$env:LOCALAPPDATA\\Continuum\\anaconda3\\shell\\condabin\\conda-hook.ps1\" ; conda activate \"$env:LOCALAPPDATA\\Continuum\\anaconda3\" ", "startingDirectory": "%USERPROFILE%", "icon": "%LOCALAPPDATA%\\Continuum\\anaconda3\\Menu\\anaconda-navigator.ico" }, { "guid": "{58ad8b0c-3ef8-5f4d-bc6f-13e4c00f2530}", "name": "Debian", "source": "Windows.Terminal.Wsl" }, { "guid": "{b453ae62-4e3d-5e58-b989-0a998ec441b8}", "hidden": false, "name": "Azure Cloud Shell", "source": "Windows.Terminal.Azure" } ] }, ``` However ever time I save the changes the contents are being changed to this (notice the last item: ``` "list": [ { "guid": "{34fa1a1d-ed51-448e-a053-62d840dfceac}", "name": "PowerShell 7", "tabTitle": "PowerShell 7", "suppressApplicationTitle": "true", "source": "C:\\Program Files\\PowerShell\\7-preview\\pwsh.exe" }, { "guid": "{574e775e-4f2a-5b96-ac1e-a2962a402336}", "name": "PowerShell 6", "tabTitle": "PowerShell 6", "suppressApplicationTitle": "true", // "source": "Windows.Terminal.PowershellCore" "source": "C:\\Program Files\\PowerShell\\6\\pwsh.exe" }, { "guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}", "name": "Windows PowerShell", "commandline": "powershell.exe" }, { "guid": "{bd3ec972-9de6-4e4a-a353-62d035770223}", "name": "Anaconda PowerShell", "commandline": "powershell.exe -ExecutionPolicy ByPass -NoExit -Command \"& \"$env:LOCALAPPDATA\\Continuum\\anaconda3\\shell\\condabin\\conda-hook.ps1\" ; conda activate \"$env:LOCALAPPDATA\\Continuum\\anaconda3\" ", "startingDirectory": "%USERPROFILE%", "icon": "%LOCALAPPDATA%\\Continuum\\anaconda3\\Menu\\anaconda-navigator.ico" }, { "guid": "{58ad8b0c-3ef8-5f4d-bc6f-13e4c00f2530}", "name": "Debian", "source": "Windows.Terminal.Wsl" }, { "guid": "{b453ae62-4e3d-5e58-b989-0a998ec441b8}", "hidden": false, "name": "Azure Cloud Shell", "source": "Windows.Terminal.Azure" }, { "guid": "{574e775e-4f2a-5b96-ac1e-a2962a402336}", "hidden": false, "name": "PowerShell Core", "source": "Windows.Terminal.PowershellCore" } ] }, ``` I may be doing something wrong, but I have not been able to determine what it is. For those that want to see this in action: ![profiles_json_terminal](https://user-images.githubusercontent.com/11204251/74249440-c9177680-4cae-11ea-83e2-0f865adde61d.gif)
claunia added the Needs-TriageNeeds-Tag-FixNeeds-Attention labels 2026-01-31 00:36:56 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#6372