Creating new user accounts in Active Directory with ADUC and PowerShell

Create a new Active Directory user in ADUC by selecting an OU and choosing Action > New > User, or in PowerShell by running New-ADUser with a name, a SAM account name and a password.

This guide covers the ADUC wizard, New-ADUser with the parameters that matter, copying settings from a template user, bulk creation from a CSV file, adding users to groups, checking the result, and the errors that stop an account from being created.

Creating new user accounts in Active Directory with ADUC and PowerShell
New Object – User shows the target OU at the top and asks for first, last and full name plus the user logon name. (Image: Microsoft)

How to create a new Active Directory user with ADUC

Active Directory Users and Computers (ADUC) is the graphical console for domain accounts. Run it on a domain controller, or install Active Directory Users and Computers on a domain-joined Windows 10 or 11 PC.

  1. Open Active Directory Users and Computers.
  2. Expand the domain tree and select the organizational unit (OU) or container that should hold the account.
  3. On the Action menu, select New, then User.
  4. In New Object – User, fill in First name, Last name, Full name and User logon name, then select Next. Full name and User logon name are required.
  5. Type the password in Password and Confirm.
  6. Tick User must change password at next logon for a temporary password, and leave Account is disabled clear unless the user starts later. Select Next.
  7. Review the summary and select Finish.

The other password boxes are User cannot change password and Password never expires, which exempts the account from the domain password policy. Leave both clear for normal staff accounts.

Create new Active Directory user in ADUC: password and account options page
Tick User must change password at next logon for a temporary password, and leave Account is disabled clear unless the user starts later. (Image: Microsoft)

Permissions needed to create users in Active Directory

Requirement Detail
Group membership Domain Admins and Enterprise Admins can create users by default. Account Operators can create, change and delete users but cannot manage groups or permissions
Tools on a Windows 10 or 11 PC The AD DS and AD LDS tools from Remote Server Administration Tools (RSAT), which include both ADUC and the ActiveDirectory PowerShell module
Domain membership The PC must be joined to the domain, and you sign in with an account that has the rights above
Writable domain controller New-ADUser does not work against a read-only domain controller (RODC) or an Active Directory snapshot

Delegated control on a single OU also works: an account that has been given the right to create user objects in that OU can run the wizard or New-ADUser there and nowhere else.

New-ADUser: creating Active Directory users with PowerShell

New-ADUser needs only -Name and -SamAccountName, but an account without a password cannot be enabled. The steps below create a usable account in a specific OU in one command.

  1. Open Windows PowerShell on a domain controller or a PC with RSAT, and run Import-Module ActiveDirectory.
  2. Store a starting password without showing it on screen: $pw = Read-Host -AsSecureString 'Initial password'.
  3. Create the user: New-ADUser -Name 'Jane Smith' -GivenName 'Jane' -Surname 'Smith' -SamAccountName 'jsmith' -UserPrincipalName '[email protected]' -Path 'OU=Sales,DC=contoso,DC=com' -AccountPassword $pw -ChangePasswordAtLogon $true -Enabled $true.
  4. Add job details in the same command or later with -Department 'Sales' -Title 'Account Manager' -EmailAddress '[email protected]'.
  5. Add -PassThru to see the new object printed, or -WhatIf to preview the command without creating anything.

Without -Path, the account lands in the default Users container, not in an OU, so Group Policy linked to your OUs will not apply to it. Keep -SamAccountName to 20 characters or fewer so older systems can sign the user in.

Attributes with no parameter of their own go in -OtherAttributes, keyed by their LDAP display name in single quotes: -OtherAttributes @{'title'='director'; 'mail'='[email protected]'}.

New-ADUser command with Name, Path, SamAccountName and UserPrincipalName parameters
One New-ADUser call sets the given name, surname, display name, OU path and both logon names for the new account. (Image: Microsoft)

New-ADUser parameters and the ADUC fields they fill

Each New Object – User field in ADUC has a New-ADUser parameter. Most settings on the user's Properties tabs have one too.

ADUC field New-ADUser parameter Notes
First name -GivenName Sets givenName
Last name -Surname Sets sn
Full name -Name The object's name in the console
Display name (General tab) -DisplayName What address lists and sign-in screens show
User logon name -UserPrincipalName Format user@dns-domain-name
User logon name (pre-Windows 2000) -SamAccountName Required by New-ADUser
Password and Confirm -AccountPassword Takes a SecureString, not plain text
User must change password at next logon -ChangePasswordAtLogon $true Not allowed together with -PasswordNeverExpires $true
User cannot change password -CannotChangePassword $true For shared or kiosk accounts
Password never expires -PasswordNeverExpires $true Exempts the account from password expiry
Account is disabled -Enabled $false An enabled account requires a password
Account expires (Account tab) -AccountExpirationDate '2027-06-30' Time defaults to 12:00 AM local time
Description, Office, Department, Job Title -Description, -Office, -Department, -Title Plain strings

The password rules come from the domain, so a weak -AccountPassword is refused. Admins can change the domain password policy to set the length and complexity a new password needs.

New-ADUser parameters for ADUC Account tab logon names and account expiry
User logon name maps to -UserPrincipalName, the pre-Windows 2000 name to -SamAccountName, and Account expires to -AccountExpirationDate. (Image: Microsoft)

Create an AD user from a template with New-ADUser -Instance

A template user carries the department, company, office and other settings every new hire in a team shares. -Instance copies those values, and the parameters you type override them.

  1. Create a disabled template account once, such as _SalesTemplate, with the shared settings filled in.
  2. Load it with the properties you want copied: $template = Get-ADUser -Identity '_SalesTemplate' -Properties Department, Company, Office, Title.
  3. Store the starting password: $pw = Read-Host -AsSecureString 'Initial password'.
  4. Create the new user from it: New-ADUser -Instance $template -Name 'Tom Lee' -GivenName 'Tom' -Surname 'Lee' -SamAccountName 'tlee' -UserPrincipalName '[email protected]' -Path 'OU=Sales,DC=contoso,DC=com' -AccountPassword $pw -Enabled $true.
  5. Add the group memberships the template has, since -Instance does not copy them: (Get-ADUser '_SalesTemplate' -Properties MemberOf).MemberOf | ForEach-Object { Add-ADGroupMember -Identity $_ -Members 'tlee' }.

Only the properties you ask Get-ADUser for with -Properties are copied. To see what the template holds, list its properties with Get-ADUser before you build from it.

Bulk create Active Directory users from CSV with PowerShell

Build a CSV file whose first row holds the column names. This example uses C:\Scripts\NewUsers.csv with the headers FirstName,LastName,SamAccountName,Department,Title,OU, one new user per row, where OU holds a distinguished name such as OU=Sales,DC=contoso,DC=com in quotes.

Import-Module ActiveDirectory
$domain = 'contoso.com'
$pw = Read-Host -AsSecureString 'Initial password for all new users'
Import-Csv -Path 'C:\Scripts\NewUsers.csv' | ForEach-Object {
    New-ADUser -Name "$($_.FirstName) $($_.LastName)" `
        -GivenName $_.FirstName -Surname $_.LastName `
        -SamAccountName $_.SamAccountName `
        -UserPrincipalName "$($_.SamAccountName)@$domain" `
        -Department $_.Department -Title $_.Title `
        -Path $_.OU -AccountPassword $pw `
        -ChangePasswordAtLogon $true -Enabled $true
}

Import-Csv turns each row into an object, and ForEach-Object passes its columns to New-ADUser as $_.ColumnName. Every account gets the same temporary password and must change it at first sign-in.

You should see: The script finishes with no red errors, and Get-ADUser -Filter * -SearchBase 'OU=Sales,DC=contoso,DC=com' lists the new accounts.

Run it once with -WhatIf added after -Enabled $true to catch typos in the file before any account is created. If your file uses semicolons, add -Delimiter ';' to Import-Csv.

When the CSV headers match New-ADUser parameter names exactly (Name, SamAccountName, GivenName, Surname, Path, Department), Import-Csv users.csv | New-ADUser works without the loop. Those accounts are created disabled with no password, so set one with Set-ADAccountPassword -Identity jsmith -Reset -NewPassword $pw and run Enable-ADAccount afterwards.

Add a new AD user to a group with PowerShell or ADUC

Access to shares, printers and apps is usually granted to security groups, so a new account is not finished until it is in the right ones.

  1. In PowerShell, run Add-ADGroupMember -Identity 'Sales Staff' -Members 'jsmith'. List several users separated by commas.
  2. In ADUC, select the user and choose Action > Properties.
  3. Open the Member Of tab and select Add.
  4. In Select Groups, type the group name, select Check Names, then OK.
  5. Select OK to close the properties window and apply the change.
Add new AD user to a group from the Member Of tab
Select Add, type the group name, choose Check Names and OK; Domain Users is already listed as the primary group. (Image: Microsoft)

How to check a new user account in Active Directory

Get-ADUser -Identity jsmith -Properties Department, Title, MemberOf, PasswordLastSet | Select-Object Name, UserPrincipalName, Enabled, DistinguishedName, Department, Title, MemberOf, PasswordLastSet

Reads the account back from Active Directory and shows whether it is enabled, which OU it is in, its job fields, its groups and when its password was set.

You should see: Enabled reads True, DistinguishedName ends with the OU you chose, and MemberOf lists the groups you added.

Disable or delete an Active Directory user account

Disable an account before you delete it. A disabled account keeps its permissions in case something depends on it, and it can be switched back on in seconds.

  1. Disable in PowerShell with Disable-ADAccount -Identity jsmith, or in ADUC select the user and choose Action > Disable Account, then OK.
  2. Turn it back on with Enable-ADAccount -Identity jsmith, or Action > Enable Account.
  3. Delete it once you are sure: Remove-ADUser -Identity jsmith, or Action > Delete in ADUC, then OK.

A deleted account comes back only through the Active Directory Recycle Bin, if it was turned on before the deletion. Otherwise you need an authoritative restore from an AD DS backup.

Enable or disable Active Directory user account from the ADUC menu
Enable Account switches a disabled user back on in ADUC; Enable-ADAccount -Identity does the same from PowerShell. (Image: Microsoft)

New-ADUser not working

New-ADUser is not recognized as a cmdlet

The ActiveDirectory module is not on this computer.

  1. On Windows 10 or 11, install the AD DS and AD LDS tools from RSAT.
  2. On Windows Server, run Install-WindowsFeature -Name RSAT-AD-Tools -IncludeAllSubFeature.
  3. Open a new PowerShell window and run Import-Module ActiveDirectory.

The account is created but stays disabled

No password was set, and an enabled account requires one.

  1. Set a password: Set-ADAccountPassword -Identity jsmith -Reset -NewPassword (Read-Host -AsSecureString 'New password').
  2. Enable it: Enable-ADAccount -Identity jsmith.
  3. Next time, pass -AccountPassword and -Enabled $true to New-ADUser.

The password is refused when the account is created

It does not meet the domain's length, complexity or history rules.

  1. Choose a longer password that mixes character types.
  2. Check the domain's rules with Get-ADDefaultDomainPasswordPolicy.
  3. Create the account again, or set the password afterwards with Set-ADAccountPassword -Reset.

Error when combining ChangePasswordAtLogon and PasswordNeverExpires

An account cannot be told to change its password and also have one that never expires.

  1. Drop one of the two parameters.
  2. For a normal staff account, keep -ChangePasswordAtLogon $true and leave -PasswordNeverExpires out.

The new user is in the Users container, not the OU

-Path was left out, so New-ADUser used the default Users container.

  1. Move it: Move-ADObject -Identity (Get-ADUser jsmith).DistinguishedName -TargetPath 'OU=Sales,DC=contoso,DC=com'.
  2. Add -Path with the OU's distinguished name to future commands.

Access is denied when creating the user

Your account lacks create rights in that OU, or the command reached a read-only domain controller.

  1. Run the command as a member of Domain Admins or Account Operators, or ask for delegated rights on the OU.
  2. Point the command at a writable domain controller with -Server dc01.contoso.com.
New-ADUser account disabled fix: Set-ADAccountPassword reset and ChangePasswordAtLogon
Set-ADAccountPassword with -Reset gives the account a password, and Set-ADUser -ChangePasswordAtLogon forces a change at first sign-in. (Image: Microsoft)

Active Directory new user account FAQ

How do I create a user in Active Directory?

In Active Directory Users and Computers, select an OU, choose Action > New > User, fill in the name and logon name, set a password and select Finish. In PowerShell, run New-ADUser with -Name, -SamAccountName, -AccountPassword and -Enabled $true.

What fields are required to create a user in ADUC?

Only Full name and User logon name are required on the first page of New Object – User. First name, initials and last name are optional, but filling them in sets the given name and surname that address lists use.

Which parameter is required for New-ADUser?

New-ADUser needs a name and -SamAccountName. Without -AccountPassword the account cannot be enabled, so a usable account also needs a password and -Enabled $true.

Where does New-ADUser put a new user?

In the domain's default Users container unless you pass -Path with an OU's distinguished name, such as -Path 'OU=Sales,DC=contoso,DC=com'. Move a misplaced account with Move-ADObject.

How do I create multiple users in Active Directory at once?

Put one user per row in a CSV file, then pipe Import-Csv into a ForEach-Object loop that runs New-ADUser for each row. Test the run with -WhatIf first so typos in the file do not create broken accounts.

Can I copy an existing user in Active Directory with PowerShell?

Yes. Load the user with Get-ADUser -Properties and the attributes you want, then pass it to New-ADUser -Instance along with the new name and logon details. Group memberships are not copied and need Add-ADGroupMember.

Who can create user accounts in Active Directory?

Members of Domain Admins and Enterprise Admins can by default, and so can Account Operators, who can also change and delete users but cannot manage groups. Admins can delegate create rights on a single OU to other accounts.

How do I set a password for a new AD user in PowerShell?

Pass a SecureString to -AccountPassword, for example -AccountPassword (Read-Host -AsSecureString 'Password'). For an existing account, run Set-ADAccountPassword -Identity jsmith -Reset -NewPassword with a SecureString.

Can I recover a deleted Active Directory user?

Only if the Active Directory Recycle Bin was enabled before the account was deleted. Without it, the account comes back only through an authoritative restore from an AD DS backup, which is why disabling first is safer.

Philip Celasco

Philip is a Texas-based technology writer and IT administrator at Techdows.com with more than 10 years of experience creating practical content for everyday users and professionals. He specializes in web browsers, particularly Chromium-based platforms such as Google Chrome, Microsoft Edge, Brave, and Opera. Through his work as an IT administrator, Philip has hands-on experience managing devices, configuring browser policies, troubleshooting software and network issues, and helping people resolve problems that affect productivity and security. His articles are based on practical testing and real-world technical experience. He covers browser settings, extensions, performance problems, privacy controls, security features, and Windows troubleshooting. Outside work, Philip enjoys the quieter side of life in Texas and stepping away from the screen when he can. He has two kids, two cats and loves to play golf with his mother during the weekends.

Leave a Reply

Your email address will not be published. Required fields are marked *