- Rename-Local User
- Syntax
- Description
- Examples
- Example 1: Rename a user account
- Parameters
- Inputs
- Outputs
- Notes
- how to change username on pc located in c:/users in windows 10 pro?
- Replies (1)
- How To Change User Name and Rename User Folder In Windows 10
- How To Creare A New Local Windows 10 Administrator Account
- How To Change A User Name In Windows 10
- How To Rename User Folder In Windows 10 And Change ProfileImagePath In Windows Registry
- How To Rename User Folder In Windows 10
- How to Change The User’s ProfileImagePath In Windows 10 Registry
Rename-Local User
Renames a local user account.
Syntax
Description
The Rename-LocalUser cmdlet renames a local user account.
The Microsoft.PowerShell.LocalAccounts module is not available in 32-bit PowerShell on a 64-bit system.
Examples
Example 1: Rename a user account
This command renames the user account named Admin02.
Parameters
Prompts you for confirmation before running the cmdlet.
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Specifies the user account that this cmdlet renames. To obtain a user account, use the Get-LocalUser cmdlet.
Type: | Microsoft.PowerShell.Commands.LocalUser |
Position: | 0 |
Default value: | None |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Specifies the name of the user account that this cmdlet renames.
Type: | String |
Position: | 0 |
Default value: | None |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Specifies a new name for the user account.
Type: | String |
Position: | 1 |
Default value: | None |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Specifies the security ID (SID) of a user accounts that this cmdlet renames.
Type: | SecurityIdentifier |
Position: | 0 |
Default value: | None |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Inputs
System.Management.Automation.SecurityAccountsManager.LocalUser, System.String, System.Security.Principal.SecurityIdentifier
You can pipe a local user, a string, or a SID to this cmdlet.
Outputs
None
This cmdlet does not generate any output.
Notes
- The PrincipalSource property is a property on LocalUser, LocalGroup, and LocalPrincipal objects that describes the source of the object. The possible sources are as follows:
- Local
- Active Directory
- Azure Active Directory group
- Microsoft Account
PrincipalSource is supported only by Windows 10, Windows Server 2016, and later versions of the Windows operating system. For earlier versions, the property is blank.
how to change username on pc located in c:/users in windows 10 pro?
I have a problem that my name is «Srijan» but in users folder located in local disk c: is showing first five words .
Help me! I want my full name on that folder.
Replies (1)
I would like to ask if you are using Microsoft account or Local account.
I suggest you to follow the methods below and check if it helps.
Method 1: Please follow the steps to rename the user account.
- In the search box, type user accounts and click on User Accounts.
- Click on “Change your account name”
- If it’s prompting for password please enter and click on Yes. If you do not have password click on Yes.
- Enter the new user name.
- Click on change name.
Method 2:
Note: Before you start, please back up all you data and create a system restore point first.
- Press Windows Key + R combination and then type netplwiz in the Run dialog box. Click OK. If prompted for UAC, click Yes.
- Now in the User Accounts window, check Users must enter a user name and password to enter this computer, if it is unchecked.
- In the User Name section, select the user name to which you want to change the name and click Properties.
- In the Properties window, in the User name field, provide the desired user name. Then click Apply followed by OK.
- Reboot to see the change.
Change User Folder name: Even after you change the username using this method, your personal folder will continue to display the old username. To rename the user folder, do the following.
- Create a system restore point first. Then open Registry Editor and navigate to the following key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList
2. You will find several folders here like S-1-5-. Search through them till you find a ProfileImagePath pointing to your old username. Double-click on it and replace your old username with your new username.
3. Restart your computer to see the change.
Disclaimer:
Important: The System Restore restores the computer back to an earlier point in time, called a restore point. System Restore doesn’t change your personal files, but it might remove recently installed apps and drivers and also reset the recently changed settings on the computer.
Registry disclaimer: Important this section, method, or task contains steps that tell you how to modify the registry. However, serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For added protection, back up the registry before you modify it. Then, you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click the following article number to view the article in the Microsoft Knowledge Base: 322756 ( http://support.microsoft.com/kb/322756/ )
How to back up and restore the registry in Windows
Write us back with status of the issue in regards with your account. Your reply is important to assist you further.
How To Change User Name and Rename User Folder In Windows 10
This Itechguide teaches you how to change user name in Windows 10. It also covers steps to rename user folder and user profile path in the Windows 10 registry.
In this Itechguide, I will change the user name of my account and rename the user folder from victo to VictorA. See the screenshot below.
Browse Post Topics
How To Creare A New Local Windows 10 Administrator Account
You cannot change a user name or rename a user folder in Windows 10 while logged in with the same account. Therefore, as I already mentioned earlier, the first step is to restart the computer and login with another.
If there is no existing administrator account, to create a new administrator account, follow the steps below:
- Search netplwiz, then click it from the search results. This opens the User Account tool.
- Then, on the bottom right of the User Accounts tool, click Add.
- On the first screen of the page that opens, click Sign in without a Microsoft account.
- Then, on the Add user screen, click Local account.
- Finally, enter a username and password for the new user. Then, on the final screen, click Finish.
- Back on the User Accounts tool, select the new account you just created. Then, at the bottom right, click Properties.
- Finally, on the new user’s account properties, click the Group Membership tab, select Administrator, and click OK.
- Restart the computer. When the computer restarts sign in with the new administrator account and proceed with the next steps below.
How To Change A User Name In Windows 10
This section teaches you how to change the windows 10 user name you wish to change. In the next and final section, I will teach you how to rename the user folder and change the profile path in Windows 10 registry.
Follow the steps below to change the user name of the original Windows 10 user you wish to change:
- Sign in to your Windows 10 PC with the new administrator account you created in the last section. If the computer had an existing administrator account, you can also sign in with that account.
- Once you are signed in, search netplwiz and open it.
- When the User Accounts tool opens, select your primary account – the account you want to change its user name. Then, click Properties.
- Then, on the Properties screen of the user account, to change the Windows 10 user name, change the name in the User name field. Then, click OK.
When you return to the User Accounts tool, the user name of the account would have been updated to the new user name.
How To Rename User Folder In Windows 10 And Change ProfileImagePath In Windows Registry
This is the last section of this Itechguide. The section has 2 sections.
To complete the tasks in the 2 sub-sections below, please stay signed in with the new administrator account you created in the first section of this guide.
How To Rename User Folder In Windows 10
- Search %SYSTEMDRIVE%\Users and open the folder from the search result.
- Then, right-click the user folder for your original user name and rename it.
How to Change The User’s ProfileImagePath In Windows 10 Registry
This is the final section of this long guide. Follow the steps below to change the user’s ProfileImagePath. This final step is essential to preserve all settings associated with the user profile.
- Search registry and open Registry Editor.
- Then, on Windows Registry Editor, navigate to the path below:
When you login with your original account, Windows 10 may take you through some final setup process.
Do not worry, select the options you prefer and allow Windows to do its thing. When it finishes, you will be signed in to your original profile.
If, however, you found the guide helpful, on the “Was this post helpful?” question, select Yes.
Alternatively, you may use the “Leave a Reply” form at the end of this page to provide us your feedback about this guide.
Finally, for more Windows 10 guides, visit our Windows 10 How-To page. You may also find our Get Help With File Explorer In Windows 10 guide helpful.