How to Change UPN Names and SMTP Addresses in Active Directory with PowerShell?

September 22, 2025 4 answers
Asked by SunnyStar88
I'm looking to change the User Principal Names (UPN) for all users in Active Directory, as well as update their SMTP addresses. Has anyone done this before using PowerShell? Is it a straightforward process?

Answers

TechSavvy89
Yeah, it's actually pretty easy! You can use the 'Set-ADUser' cmdlet to do that without too much hassle.
Reply to this answer
CodeNinja17
Honestly, if you just Googled this, youโ€™d get a script from Bing or something in no time! But hey, I get itโ€”itโ€™s always good to double-check things.
Reply to this answer
CuriousCat99
I totally understand wanting to ask! My PowerShell skills are basic too, but I often run into issues with CoPilot. It sometimes fixes bugs only to create new ones. Microsoft seems to be having some difficulties lately, huh?
Reply to this answer
CloudMover32
Definitely! We had to change our domain when transitioning to Azure. Just a heads up that if your onboarding system doesnโ€™t support bulk updates, you might need to run the script multiple times or change UPNs manually during user creation. AD doesnโ€™t allow you to set a new default easily.
Reply to this answer

Add your answer

Answers are reviewed before publication.

Related Discussions