If you are unable to open the Windows Settings panel and want to create a new user account on your Windows 10 computer, this article will help you. You can create a local user account with the help of PowerShell.
There are mainly two types of user accounts in Windows 10-
- Local user account
- User account connected to the Microsoft account
It is not possible to create a user account connected to a Microsoft account with the help of Windows PowerShell, but it is very easy to create a local user account at the ###. ### ### #####################################################################39; PowerShell help.
Before you begin, you should know that you can create a user account with or without a password, and the commands are different because they depend on your choice.
Create a new local user account without password using PowerShell
To create a new local user account without a password using Windows PowerShell, open Windows PowerShell with Administrator privileges. To do this, press Win + X and select Windows PowerShell (Admin) from the list. After that, run the following command-
New-LocalUser -Name "user-name" -Description "Small description" -NoPassword
Do not forget to replace the User name with a real user name that you want. Replace too Short description text with the subject you want to display as a description.
After executing the order, as mentioned above, you will be able to set up your account and use it accordingly.
Create a new local user account with a password using PowerShell
Open Windows PowerShell with Administrator privileges. For this you can follow the guide as mentioned before, or you can search the "PowerShell" in the search box of the taskbar and select the Run as an administrator option on your right.
After you open PowerShell, you must create a password for your user account. To do this, enter this command-
$Password = Read-Host -AsSecureString
You must now enter the password you want. Make sure you have set a strong password.
After typing the password and pressing the Enter button, you must enter this command-
New-LocalUser "TWCTEST2" -Password $Password -FullName "TWC Test Account" -Description "Small description”
Replace TWCTEST2 with your desired user name, TWC test account with the full name of your user account, and Short description with brief information about your account.
After entering this command, you can find a screen like this
This means that your account is successfully created and ready to use. However, if you want to assign your account to a group, you can use the following command-
Add-LocalGroupMember -Group "Administrators" -Member "TWCTEST2"
Here are two things you need to know. First, if you want to add the new account to your Administrator group, you can keep it as-is. Second, you must replace TWCTEST2 with the user name of your new user account.
How to delete a user account using PowerShell
To delete a user account with Windows PowerShell, open Windows PowerShell with Administrator and enter this command-
Remove-LocalUser -Name "user-name"
Do not forget to replace the User name with the name of the original user you want to delete from your computer.
That's it! I hope this will help you.