In Windows 11, when setting up your MSFT Account, the OS defaults to the first 5 characters of your MSFT account for your user profile directory (ie- C:\Users\12345). These instructions are how to rename the directory safely.
-
Enable local administrator account and log in as it
-
Make replacements in Windows Registry. Find the acct sid and change the username there (Update this with the exact path)
-
Rename C:\Users\12345 to the new username
-
Add symlink just in case anything references it (update command here later)
-
Run command to rename local user:
Rename-LocalUser -Name "$env:username" -NewName "NewUsername"
Or using WMIC if that didn't work. I can't rememberwmic useraccount where name="$env:username" rename "NewUsername"
-
Reboot and test