Want to create a local Windows account on your PC so as not to use Microsoft's integrated online services? Forget Windows Settings. A few seconds are enough with command lines.
With Windows 10, you can create as many user accounts as you want on your PC. These can be Microsoft accounts, attached to an email address (Outlook, Live, Hotmail or other) that integrate online services such as data synchronization on OneDrive, or simple local accounts (for more information, see our practical sheet Creating and managing user accounts with Windows 10). For the latter, it is not necessary to provide an e-mail address, since all the data remains local, on the computer. But what a pain to create them through the menus and submenus of Windows! More than a dozen clicks, secret questions to define and answers to provide ... In short, if we follow the path traced by Microsoft to define such an account, whether it is a standard or administrator account , you have to spend several long minutes there.
However, it takes about ten seconds to achieve this using PowerShell or the command prompt. A very short command line provides a standard account. One second transforms it into an administrator account. Not bad is not it ? And when you no longer need it, a final line allows you to delete the account immediately. Even if you are not familiar with the command lines, doing this will save you a lot of time.
How to create a local account in Windows?
Two tools are at your service to enter command lines depending on the version of Windows installed on your PC: the command prompt (the famous cmd.exe) or PowerShell, which now replaces it (for more information, see our file practical Using the Windows command prompt). Whether you use one or the other, the result will be the same.
- Right-click the button Start. In the menu that appears, choose Windows PowerShell (admin) ou Command prompt (admin) according to the proposed tool. Then click on Yes to authorize the opening of the application.
- Don't be intimidated by the window that opens. Simply enter the following command, replacing user and password with the name and sesame you want to assign to the account:
net user / add user password
For example, you can indicate net user /add Essai 123456.
- Confirm by pressing the key Starter of the keyboard. Command completed successfully is displayed. A standard user account with the name Trial and locked with the password 123456 is created.
- To see this, click on the button Windows then on your user account. The list of accounts on this PC is displayed with, among these, the newly created account.
- To transform this standard account into an administrator account, click in the PowerShell or Command Prompt window and enter the following command:
net localgroup administrators user / add
Which, with our example gives net localgroup administrators Trial / add
- Confirm by pressing the key Starter of the keyboard. Command completed successfully is displayed. The newly created account now has administrative rights on this PC.
How to delete a local account in Windows?
Is your local account no longer useful to you? You can get rid of it just as quickly.
- In PowerShell or the Command Prompt (always launched in administrator mode), enter the following command:
net user / delete user
Which, with our example gives net user / delete Essay
- Confirm by pressing the key Starter of the keyboard. Command completed successfully is displayed. The specified account (either Standard or Administrator) has been deleted.