Menu

How to Create an Active Directory Account Using Powershell in Windows Server

Creating new AD accounts or removing AD accounts is a day to day task for a system administrators when new employees may be joining or any existing employee may be leaving the company. While the GUI is an easy way for this purpose if you add just a single account, it would be time-consuming if the accounts are in bulk or when the process shall be automated.

This article demonstrates how to create both single and multiple AD accounts using PowerShell in Server 2012 R2.

Creating a Single AD Account

To create a single user account for a fictive person named Sam Perry using sperry for SAM account name and sperry@yourdomain.com for user principal name, issue the following command on Powershell:

Creating Multiple Accounts

You may require creating AD accounts in bulk e.g. when hundreds of new students join the college or university. You can create a CSV file that contains the user information. Import the file using the PowerShell command and input it to New-ADUSer cmdlet.