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?

7 Answers7

8

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

Cheeso
  • 2,159
ujeenator
  • 181
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

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

Muhd_Mubi
  • 1
  • 1
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

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

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.

ThioJoe
  • 91
  • 4