How can I bulk-add new email aliases to Active Directory users with PowerShell?

September 30, 2026 3 answers
Asked by MellowCedar42
Our legacy email format is the first initial plus surname at the old domain—for example, Bob Morton would use [email protected]. New accounts follow a firstname.lastname format at a different domain, such as [email protected]. I need to add the new-format address as an alias for several hundred existing users. What would be a safe and reliable PowerShell approach for generating, validating, and applying these aliases in bulk?

Answers

PixelHarbor19
The alias generally belongs in Exchange or Exchange Online rather than only changing the Active Directory mail field. Depending on your setup, add it to the user’s proxyAddresses attribute or use the relevant Exchange cmdlet. A lowercase smtp address is normally an alias, while an uppercase SMTP address identifies the primary address. Directory synchronization can then update the cloud account if that is how your environment is configured.
Reply to this answer
NorthOak88
Use a regex or another filter to find accounts that do not already match the new naming standard, then generate the address from each user’s first and last name. Before making changes, export a report or use WhatIf, check for duplicate addresses and naming collisions, and process users in small batches. Avoid putting real employee data into external AI tools, and never test an unverified bulk script directly in production.
Reply to this answer
QuietFalcon7
Break the task into smaller steps: retrieve the users, filter out anyone who already has the desired alias, build the address from the user’s first and last name, update the appropriate mail attribute, and then validate the results. Get the process working for one test account first, then run it against a small batch before expanding it.
Reply to this answer

Add your answer

Answers are reviewed before publication.

Related Discussions