3

I just installed Windows 11 Preview.

Windows 11 Pro
21H2
‎2021-‎07-‎02
version   22000.51
Windows Feature Experience Pack 421.16300.0.3

Since then, I have been getting a Windows PowerShell window with an error message on every boot:

Encountered errors while loading user settings

Could not find your default profile in your list of profiles - using the first profile. Check to make sure the "defaultProfile" matches the GUID of one of your profiles.

Screenshot of error message above

It seems it's running in Windows Terminal, which I have installed. I checked settings.json, but it seems to me like defaultProfile is filled in correctly and when I open a terminal of that profile later it works just fine.

    "defaultProfile": "{2c4de342-38b7-51cf-b940-2309a097f518}",
            {
                "cursorShape": "filledBox",
                "guid": "{2c4de342-38b7-51cf-b940-2309a097f518}",
                "hidden": false,
                "name": "Ubuntu",
                "source": "Windows.Terminal.Wsl",
                "startingDirectory": "\\\\wsl.localhost\\Ubuntu\\home\\august"
            },

How do I solve this new problem?

3
  • 3
    This issue sounds similar to what people encountered in this thread. One suggestion is to delete the settings.json file and allow it to generate a new one. Take a backup of your file first just in case. Another possible solution is to disable and reenable WSL.
    – MC10
    Commented Jul 2, 2021 at 6:01
  • Are you attempting to run PowerShell within WSL? I would also try removing the settings.json and performing a Reset of Windows Terminal; Be sure you are running the current version of Windows Terminal. This issue doesn’t appear to be directly linked to Windows 11 but is simply a bug with WSL and Windows Terminal (but Windows 11 incompatibility is still a possibility) so downgrading to your previous version might be necessary to debug this issue
    – Ramhound
    Commented Jul 2, 2021 at 6:04
  • im having the same issue aswell. i can't access my ubntu 18.04 WSL. How did everyone else solve this issue? Where are my files so I can backup? Commented Nov 7, 2021 at 18:17

7 Answers 7

5

This happened to me after I had updated PowerShell version, the fix was simple:

  1. Go to "Settings" -> "Profiles" -> "Defaults"
  2. Select some different shell in "Startup" -> "Default profile" dropdown and press save
  3. Select back your preferred shell in "Startup" -> "Default profile" dropdown and press save

enter image description here

1

i think if opened as admin might change the outcome- try to open the terminal as a regular user first - might solve it, as the error states that the current user is not part of the default profile - another way would be to go to actual user profile or Dafualtuser group mentioned in the error and edit the permissions there, i believe you can also solve it by going the the actual terminal file - right click and either add you current user to the list of users with full permissions or change the owner of the file - also posted by microsft to change the profile you can also 1.first open the Windows Terminal as admin 2 next click on the down arrow button from the top bar, and click/tap on the Settings -or press Ctrl + to see the settings,(see screenshot below)

https://i.sstatic.net/OAcVD.jpg

3 press the startup in the left pane. (see the screenshot below) https://i.sstatic.net/0G4Cv.jpg

4 Select the shell profile (for example : "Windows PowerShell" or "Command Prompt") you want to use as the Default profile in the drop menu and simply reselect powershell.

5 dont forget to click/tap on Save at the bottom right.

6 You should now close the Settings tab and reopen Windows Terminal and it will work

1
  • Opening as admin did not help in my case. Commented Mar 26, 2022 at 15:30
0

I tried the solution suggested by MC10 in the comments, deleting my settings.json file, but it had no effect. As I recall, this problem went away by itself after a few more months in the Windows Insider Dev Channel. I can only assume that an update fixed it.

Windows 11 Pro Insider Preview
Version Dev
‎2021-‎11-‎08
22494.1000
Windows Feature Experience Pack 1000.22494.1000.0
Windows Terminal 1.11.2921.0
0

go to

Terminal open new tab and select settings or press ctrl + , in Default profile select the menu select one scroll down and select Save reopen Terminal will not show error again

2
0

The correct fix is to generate a new guid for the profile and edit the settings.json file. Replace the incorrect guid with the new one you generate.

You can run [guid]::NewGuid() in PowerShell to generate a GUID for your custom profile. You can also use the online GUID https://www.guidgenerator.com/ or for other command lines, use the UUID https://github.com/uuidjs/uuid.

Source https://learn.microsoft.com/en-us/windows/terminal/customize-settings/profile-advanced

1
  • 2
    Welcome to SU. Please see the guidelines for answering in the Help. It's perfectly fine to point to external resources, but your answer should contain the meat of the resource. This because if the link target disappears for any reason (as MS resources often do...), the answer becomes useless. Please edit your answer to add the missing advice. Commented Apr 6, 2023 at 15:02
0

Nothing worked for me except for the simple instructions described in the link below, which I hope will also work for others.

https://www.tenforums.com/tutorials/177955-how-change-default-profile-windows-terminal-app-windows-10-a.html

1
  • 1
    While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - From Review
    – zx485
    Commented Apr 8 at 1:44
-1

If the problem is a messed up settings file (maybe a curly bracket got misplaced somewhere or something), you can access a fresh default config by clicking the dropdown next to the tabs, and alt + click on settings. This brings up defaults.json (Just clicking without holding alt brings up the regular settings menu.)

Then copy everything from the defaults.json and use it to replace the other settings.json file.

Another thing you might try if that doesn't work, is in Windows settings, go to Apps, and find the entry for Windows Terminal. Click it to expand, then click 'Advanced Options'. You'll see two options to 'Repair' and 'Reset' the app which would be worth trying, in that order.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .