Would you like to learn how to create a domain user account using Powershell? In this tutorial, we are going to show you how to use Powershell to create a user account on the Active Directory.

• Windows 2012 R2
• Windows 2016
• Windows 2019
• Windows 10
• Windows 7

Equipment list

The following section presents the list of equipment used to create this tutorial.

As an Amazon Associate, I earn from qualifying purchases.

Related tutorial - PowerShell

On this page, we offer quick access to a list of tutorials related to PowerShell.

Tutorial Powershell - Create a domain user account

As an Administrator, start a new Powershell command-line.

Windows 10 - powershell elevated

Create a domain user account.

Copy to Clipboard

In our example, we created a domain user account named Gohan.

The new user account will be created in the Active Directory organizational unit named Users.

Keep in mind that you need to change the username and password.

List all domain user accounts.
Copy to Clipboard

Verify the existence of the new domain user account.

Here is the command output:

Copy to Clipboard

Configure the new user account as a member of a domain group.

Copy to Clipboard

In our example, the user was configured as a member of the domain admins group.

Verify if the user account is a member of the domain group.

Copy to Clipboard

Here is the command output:

Copy to Clipboard

Congratulations! You are able to create a domain user account on the Active Directory using Powershell.

Tutorial Windows 10 - Installing the Active Directory Powershell modules

If your computer does not recognize the commands used, you need to install the Powershell modules for the Active Directory included on the RSAT package.

As an administrator, open the Start menu and access the Settings option.

Windows 10 - Start menu Settings

Access the Apps settings.

Windows 10 - App settings

Access the optional features screen.

Install Rsat on Windows - optional features

Select the option to Add a feature.

Install Rsat on Windows - Add optional features

Search and install the following package.

• RSAT: Active Directory Domain Services and Lightweight Directory Services Tools.

Windows 10 powershell active directory management

Congratulations! You have finished the installation of the Powershell modules to manage the Active Directory on Windows 10.

Tutorial Windows 10 - Installing the Active Directory Powershell modules

As an Administrator, start an elevated version of the Powershell command-line.

Windows 10 - powershell elevated

Verify if the required package is already installed.

Copy to Clipboard

Here is the command output.

Copy to Clipboard

Optionally, filter the output of the Powershell command to a simpler version.

Copy to Clipboard

Here is the command output.

Copy to Clipboard

Install the package containing the Powershell modules for Active Directory management.

Copy to Clipboard

Here is the command output.

Copy to Clipboard

Optionally, use the package full name to install the required software.

Copy to Clipboard

Congratulations! You have finished the installation of the Powershell modules for Active Directory management.

Tutorial Windows server - Installing the Active Directory Powershell modules

As an Administrator, start an elevated version of the Powershell command-line.

Windows 10 - powershell elevated

Install the Active Directory Powershell modules.

Copy to Clipboard

Congratulations! You have finished the installation of the Powershell modules for Active Directory management on the Windows server.