When creating a new user in Active Directory, it usually requires only the basic details such as the username and password. Other required attributes, like the email address, are often added manually. You can add an email address to a user in Active Directory using a simple, straightforward method.
You can simply open Active Directory Users and Computers (ADUC), right-click the user object, and select Properties. Then, go to the General tab, and add the email address in the E-mail field.
However, this approach becomes difficult when managing email addresses for multiple users. Even updating email details for just 10 accounts takes time, and doing the same for hundreds of users quickly turns into a repetitive and error-prone task. In such scenarios, you can use the following ways to add, update, or remove email addresses in bulk.
To add email addresses for multiple users, log in to a domain controller or a system with ADUC installed and follow the steps below. This method assigns email addresses using a fixed format based on each user’s logon name and your domain.
- Open Active Directory Users and Computers and navigate to the OU or container that contains the target users.
- Alternatively, you can use Saved Queries to quickly list all users in your domain. Then, select multiple users using Shift or Ctrl.
- Right-click the selection and choose Properties.
- In the ‘General’ tab, select the E-mail field and enter the email format below.
- Click Apply and then OK.
To remove email addresses for multiple users, follow the same steps to select the user accounts. Then, go to Properties → General, select the E-mail field, leave it empty, and click Apply. This removes the email attribute from all selected accounts.
The ADUC approach becomes less practical when each user needs a different email address instead of a common username@domain based format. In such scenarios, PowerShell provides a faster and more flexible way to add email addresses for multiple users at once.
- To get started, create a CSV file containing the usernames and the email addresses you want to assign.
- Run the following command after replacing the <FilePath> to add email addresses for bulk Active Directory users.
Import-Csv -Path "<FilePath>" | ForEach-Object {
$User = $_.Users
$Email = $_.EmailAddress
Set-ADUser -Identity $User -EmailAddress $Email
Write-Host "Updated primary email to $Email for $User"
}
You can also remove email address from a group of users with PowerShell. Create a CSV file that contains the usernames. Then run the following command after replacing <FilePath> to clear the email attribute for all users listed in the file.
Import-Csv "<FilePath>" | ForEach-Object {
$User = $_.Users
Set-ADUser -Identity $User -Clear mail
}
- "To simplify email management, AdminDroid provides powerful Active Directory Flow Agents. In just a few clicks, you can automate the creation, removal, and updating of email attributes for individuals or entire departments. Deploy your workflow once and let AdminDroid handle email address updates automatically."