Encountered errors while loading user settings in Windows Terminal on Windows 11

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?


Solution 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://imgur.com/cObMmnj

3 press the startup in the left pane. (see the screenshot below) https://imgur.com/fdaygUI

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