How to Add New User Account on Windows Server 2022
Whenever a new server administrator or user comes on board, you need to get him a new user account to let them join the network and start his/her job. In the following article, I will create a new user account by the name of Ali Hasnain using Server Manager and PowerShell. By the end of this article, I hope you can easily add a new user to Windows Server 2022.
Related: Download Windows Server 2022 ISO File for Free
Add new user on Windows Server 2022
You can add a new user account on Windows Server either through PowerShell or Server Manager.
How to add a new user using Server Manager?
To add a new user via the Server Manager, follow the steps below:
- Open the Server Manager (You can search it in the Search Box or open it from the Start Menu)
- Click on the Tools on the top right-hand side of the Server Manager Dashboard window. Find, Active Directory Users and Computers from the drop-down menu and click on it.
- On the Active Directory Users and Computers window, you will see the domain name on the top left-hand side. Click on the domain name to expand it.
- There are multiple folders (containers) and organizational units. Find the Users container and left-click on it. You will see all the existing users and groups.
- If you right-click on the Users folder, a right-click menu shows up. Then click on the New > Users to add a new user.
- Fill in the new user’s first name, last name, and user login name in the new dialog box and click next.
- Enter the new password, and confirm it. Moreover, there are four options that you can check or uncheck according to your wish. If you want the user to change the password at the next login, tick the first option. Select the second option if you do not allow the user to change the password. You can read each option’s instructions and act according to your wish.
You have created a new user account, go back to the Users container, and see the new user added to the list. If you want to edit the user information, you can double-click on the user and add or change the user information from the user’s properties.
How to create a Local User Account on Windows Server from PowerShell?
The second way to create a user account on Windows Server 2022 is through PowerShell. To do that, you must run PowerShell ISE as an administrator. In the PowerShell window, write the following commands and enter:
New-LocalUser –Name “Name_of_the_User” –NoPassword
The above command creates a new user without a password. Remember to write the new user’s name between the quotation marks. If you want to add more details of the new user, such as full name and description, write the command below:
New-LocalUser –Name "Name_of_The_User" –FullName "Full_Name_of_User" –Description "write the description for the user" –NoPassword.
This command adds a description and full name for the new user. (Write the description and full name between the quotation marks).
If you want to create a new user with a password, first, you must define a variable ($Password Statement) to store the password securely as a secure string. Write the below command and enter. A password box pops up, enter the password and click OK.
$Password = Read-Host –AsSecureString
The $Password statement defines a variable to save the password as a secure string. Now write the command below to create a new user.
New-LocalUser –name “Name_of_User” –Password $Password
Instead of giving a password directly, you may notice that we used the variable name ($password), and this variable name contains the password.
Now you created a user with PowerShell. To see the list of users, write the command below and enter:
Get-LocalUser
Conclusion
In this article, you have learned to create a new user using the Server Manager and PowerShell. You can now create a new user on your Windows Server system and use that account easily to log into your system.
You may like: How to Disable Server Manager Auto-Launch in Windows Server 2022