Create a new UPN and use it as default for all your users

Martin 21/09/2015

If you in ex. want to enable Autodiscover for your mail clients, they need to have their e-mail as their username, and there for the UPN (Universal principal name), has to be changed from domain\user to

Here is how to do this in Active Directory, and then via PowerShell, change it on all the already created, user accounts.

  1. Open Active Directory Domains and Trusts
  2. Right-click “Active Directory Domains and Trusts and choose “Properties”
  3. Now add the mail domain name to it:
  4. Press OK and your’e done with this part.
  5. Now all the users that already are on the system, needs to have their default UPN replaced, this can be achieved with a PowerShell script:

    Copy the above script to a .ps1 file and run it from powershell, and this, you should see the default domain has be changed on each user account 😉

About the Author

Leave a Reply