Want to create a local Windows account on your PC so you don’t use Microsoft’s built-in 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, linked to an email address (Outlook, Live, Hotmail or other) that integrate online services such as data synchronization on OneDrive, or simple local accounts (to find out more, see our practical sheet Create and manage user accounts with Windows 10). For the latter, it is not necessary to provide an email address, since all the data remains locally, on the computer. But what a hassle 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, about ten seconds are enough 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 command lines, this manipulation will save you precious time.
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 practice Using the Windows Command Prompt). Whether you use one or the other, the result will be the same.
- Right-click the button To start up. From the menu that appears, choose Windows PowerShell (admin) Where 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 by the name and sesame that you want to assign to the account:
net user /add user password
For example, you can specify net user /add Trial 123456.
- Validate by pressing the button Hall of the keyboard. The mention the reference The command completed successfully is displayed. A standard user account with the name Test and locked with password 123456 is created.
- To find out, click on the button Windows then on your user account. The list of accounts on this PC is displayed with, among them, 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 user administrators /add
Which, with our example, gives net localgroup admins Try /add
- Validate by pressing the button Hall of the keyboard. The mention the reference The command completed successfully is displayed. The newly created account now has administrative rights on this PC.
Your local account is no longer useful to you? You can get rid of them just as quickly.
- In PowerShell or the command prompt (always launched in administrator mode), type the following command:
net user /delete user
Which, with our example, gives net user /delete Trial
- Validate by pressing the button Hall of the keyboard. The mention the reference The command completed successfully is displayed. The specified account (either Standard or Administrator) has been deleted.