Windows 2022
Sponsored Link

Active Directory : Add User Accounts2021/12/07

Add User Accounts on Active Directory.
[1] Run PowerShell with admin privilege and configure like follows.
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

# show current user list
PS C:\Users\Administrator> Get-ADUser -Filter * | Format-Table DistinguishedName 

CN=Server World,CN=Users,DC=srv,DC=world

# for example, add [ADUser01] user
PS C:\Users\Administrator> New-ADUser ADUser01 `
-Surname ADUser01 `
-GivenName ADUser01 `
-DisplayName "AD User01" `
-EmailAddress "" `
-AccountPassword (ConvertTo-SecureString -AsPlainText "P@ssw0rd01" -Force) `
-ChangePasswordAtLogon $true `
-Enabled $true 

# verify
PS C:\Users\Administrator> Get-ADUser -Identity ADUser01 

DistinguishedName : CN=ADUser01,CN=Users,DC=srv,DC=world
Enabled           : True
GivenName         : ADUser01
Name              : ADUser01
ObjectClass       : user
ObjectGUID        : 3317faca-ccea-4ff8-8bc4-ab2e7e54c878
SamAccountName    : ADUser01
SID               : S-1-5-21-220755274-1434786659-4133053638-1106
Surname           : ADUser01
UserPrincipalName :

# with specify [OU], run like follows
PS C:\Users\Administrator> New-ADUser ADUser02 `
-Path "OU=Hiroshima,DC=srv,DC=world" `
-Surname ADUser02 `
-GivenName ADUser02 `
-DisplayName "AD User02" `
-EmailAddress "" `
-AccountPassword (ConvertTo-SecureString -AsPlainText "P@ssw0rd02" -Force) `
-ChangePasswordAtLogon $true `
-Enabled $true 

# to reset existing user's password, run like follows
PS C:\Users\Administrator> Set-ADAccountPassword -Identity ADUser02 `
-NewPassword (ConvertTo-SecureString -AsPlainText "UserP@ssw0rd02" -Force) `

# to delete a user, run like follows
PS C:\Users\Administrator> Remove-ADUser -Identity "CN=Redstone,CN=Users,DC=srv,DC=world" 

Are you sure you want to perform this action?
Performing the operation "Remove" on target "CN=Redstone,CN=Users,DC=srv,DC=world".
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "Y"): Y
Active Directory : Add User Accounts (GUI)
On GUI configuration, set like follows.
[2] Run [Server Manager] and click [Tools] - [Active Directory Users and Conputers].
[3] Right-Click [Users] on the left pane and select [New] - [User].
[4] Input Username and Logon name for a new user.
[5] Set initial password for a new User.
[6] Check contents you set and click the [Finish] button.
[7] A new user is just added.
Matched Content