Name did not change in powershell

Anonymous
2024-01-31T22:33:32+00:00

I changed my user name in c:\Users , my microsoft account, and in control panel ,my new name shows in those places. Yet old name shows in powershell. I am sole user of this computer. No one else has access. Windows 11 Pro 64-bit Version 23H2 (build 22631.3085) How can I have my new name show in powershell ? Control panel pic below with new name

![](https://learn-attachment.microsoft.com/api/attachments/3e78c793-5871-4aa8-a5fb-a9a9b08d9615?platform=QnA

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
{count} votes

9 answers

Sort by: Most helpful
  1. EmilyS726 188.7K Reputation points Independent Advisor
    2024-01-31T23:48:24+00:00

    Hello, this is Emily.

    Because this username is being referenced in a lot of places including registry, to maintain your user profile integrity, it is best that you create a new user instead, and then migrate your Microsoft account (if you have it linked) and data over.

    Here are the steps:

    1. Type netplwiz in the search on the taskbar and hit enter. When launched, click on "Add". On the next window, click on the bottom where it says to create an account without Microsoft email. This will allow you to define your own username. Make sure it doesn't contain space or special character. Set it up as a local user.
    2. When the above user is created, back to the main netplwiz page, double click on this new user, go to the Group Membership tab, make it administrator. Save the change.
    3. Go to Windows Settings > Accounts > Your Info. Click on "Sign in as a local user instead". Follow the steps to finish the rest. This will release the association of your Microsoft email to this Windows log in.
    4. Restart the computer. Sign into the new user you created in Step 1.
    5. Go to Windows Settings > Accounts > Your Info. Click on "Sign in with your Microsoft account". You can then use the same email address you released on Step 3. This will tie your Microsoft email address now to this new Windows log in.
    6. If you have data at the old username folder, go to C:\users\old username folder, find them and copy them into C:\users\new username folder.
    7. Type sysdm.cpl in the search on the taskbar and hit enter, go to Advanced tab, click on the "Settings" button at the User Profile section. Then delete the old user profile.
    8. Launch netplwiz again, delete the old user from there.
    0 comments No comments
  2. Anonymous
    2024-02-01T01:43:14+00:00

    Thanks Emily but the last time I did what you suggested, I could no longer logon as admin. and got stuck as a user only. Somehow security settings in group policy editor locked me out. I could not open control panel or even most settings, as it said that I did not have permission and needed to contact my IT manager. And still no one has been able to tell me exactly what happened and why. I had a two guys from geek squad come in person to look at it. All they could say was "I have never seen that before" I had to do a complete factory re-set and installation of windows because nothing else worked. So while what happened was very unusual I am not doing that again. And I also changed name in regedit

    0 comments No comments
  3. EmilyS726 188.7K Reputation points Independent Advisor
    2024-02-01T01:49:02+00:00

    Is your computer in domain? If not, this shouldn't cause the issue you mentioned above. These steps I've used with many users with this same issue and this is the first time I heard about admin issue. I wonder if you didn't assign the new user admin after creating it. This is why I had 2 in there. I will suggest that you at least do the first two steps, and then see if you can sign into the new userr with admin. Then you can go back to continue the rest. Do not skip any of the steps and switch its order.

    0 comments No comments
  4. Anonymous
    2024-02-01T15:25:41+00:00

    No my comp is not in domain. What you stated above is indeed true. I know people who have used it to effect with no problem . But for some reason when I did it something went wrong (yah I probably messed something up) I was just joking around a bit, cause stuff like that happens to me quit a bit. I hear the phrase "I have never seen that before" about 2 or 3 times a month. And B.T.W Thanks for your response

    0 comments No comments
  5. EmilyS726 188.7K Reputation points Independent Advisor
    2024-02-01T15:29:08+00:00

    If you want to be extra safe, you can enable the built in administrator account, just in case, so that you have a backup admin to recover issue.

    Run command prompt in admin mode, and run this command:

    net user administrator /active:yes

    0 comments No comments