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 user@domain.com.

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”
    UPN1
  3. Now add the mail domain name to it:
    UPN2
  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 😉
    Domain

About the Author

Leave a Reply