Murat Cudi Erenturk, Insights of an Architect

This blog reflects my insights on IT trends, technology and processes. Ideas expressed here are my own and does not reflect opinions of Microsoft.

October, 2011

  • Cross-forest Exchange Migration, notes from the field Part 2, Setting UPN

    In the first part of this series I had an overview of
    Exchange migration which can be found here.

    In the second part of these series I will provide more about
    handling the transformation to UPN. When you decide to use e-mail addresses for
    your UPN, you will need to make sure that you create the UPN from the used
    e-mail address of the user. Although this may seem trivial it may not be.
    Generally you will want to create the UPN from user’s alias attribute and the E-mail
    domain. However alias attribute is populated only once during the mailbox
    creation and administrator can change the mail address of the user after it has
    been created. In order to identity these account we need a script to compare
    these values. The script will basically do the following:

    First read all the mailboxes in the organization and loop on
    them. Please note that you will need to put resultsize unlimited parameter to
    get the whole picture.

    get-mailbox
    -resultsize unlimited | foreach{

    Then you would need to get the e-mail addresses of the user
    inside the loop.

    for ($i=0;$i -lt
    $_.EmailAddresses.Count; $i++)

    Once you have the list, you will go through the list looking
    for address prefix SMTP which will give you the Primary SMTP address (Secondary
    ones will be given by smtp). Some of the users may have empty Email addresses
    so you need to check that condition also

    $address =
    $_.EmailAddresses[$i]

    $a=$address.AddressString.ToString()

    if
    ($address.PrefixString -eq "SMTP" -and $a.length -gt 0 -and $a.indexof("@")
    -gt 0)

    Now that you have found the address you need to store it to
    be used after the loop.

    $Primary=$a.substring(0,$a.indexof("@"))

    Now lets check if this matches the alias attribute

    if
    ([String]::Compare($_.Alias,$Primary,$True) -ne 0)

    You will generally have the necessary plumbing to write the
    results into a log file for easy consumption. The complete script can be found
    as an attachment to the blog. The script is provided as is without any warranty
    so use it at your own risk.

    After you have identified these users you will need to
    correct the alias attribute according to the primary SMTP address attribute.
    The script for this is left as an exercise to the user.

    You may be asking why we were so diligent about correcting
    the alias attribute instead of setting the attribute through a script. The
    reason is simple; writing scripts to touch large number of users requires
    careful testing.

     So now we need to do
    the following:


    • Create
      UPN suffixes:
      Creating UPN suffixes can easily be done through a single
      line of PowerShell. See here
      for more details.

    • Populate
      UPN prefix for each user:
      You can use ADModify tool to do
      this.

    After this tasks your users will be able to use the same
    e-mail address as their logon names.

  • Cross-forest Exchange Migration, notes from the field Part 1, Overview

    Exchange migration has always been a topic of interest for
    organizations. As more and more organizations depend on Exchange as their core
    infrastructure downtime during upgrades have been noticeable by the clients and
    need detailed planning. When there is a need to change the forest as a part of
    this upgrade, the problem becomes a complex migration exercise.

    Let’s take a hypothetical organization running Exchange 2007
    which wants to move to Exchange 2010 in a new forest. For the sake of argument
    lets say customer only wants to migrate exchange functionality to the new
    forest and the old forest will remain where Exchange will be uninstalled. When
    the number of clients involved is large, the mailbox move process can take
    longer than the organization can tolerate downtime and coexistence is needed.
    Coexistence can be defined as where you have 2 exchange organizations in 2
    different forests and it acts like a single organization. Here are important
    points to consider for kind of migration:


    • Mail
      flow:
      generally mail flow to and from Internet is done from the old
      organization during coexistence phase and mail between the organization is done
      with connectors in between.

    • Mail
      Access:
      For OWA users this will depend on where the mailbox is hosted at a
      given particular time. Exchange can provide redirection to the new environment,
      more on this later. For Outlook anywhere and ActiveSync users Autodiscover will
      need to be used in cross-forest configuration. In order for autodiscover to
      work you will need to have Outlook 2007 as a minimum on clients.

    • Availability:
      During coexistence you need to be able to query free/busy information. Exchange
      2010 supports several methods to get this information.

    In order for these functions to work, you need do analysis
    on source forest:


    • Single
      sign on:
      During coexistence you will need an entry point that can connect
      to both forests and would receive credentials from clients only once.

    • Account
      names:
      If customers are using Domainname\username format to logon, this
      will need to change when Exchange moves to the new forest. One way to solve
      this problem will be to use UPN. Users accessing old forest can start using UPN
      and the new forest will also have the same UPN but different forest name. Generally
      you would want to have UPN the same as the e-mail of the user.

    This part clearly shows you need to have a lot of
    preparation before you do the migration. We will focus on more details in later
    series.