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?
3 Answers
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.
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.
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.

Related Questions
Can't Load PhpMyadmin On After Server Update
Redirect www to non-www in Apache Conf
How To Check If Your SSL Cert Is SHA 1
Windows TrackPad Gestures