How to migrate Exchange 2003 to Office 365 using the built in migration tool.

21 Steps total

Step 1: Discovery Phase

Discover how many mailboxes, what the DB size is and what subset of mailboxes will actually be moved.
Get the answers to the following questions via the intro / discovery phone call and via the remote sessions to the Exchange 2003 Server.
1- Point Of Contact (email, phone, mobile)
2 – Exchange MDB Size
3- Mailbox Count (Total Count At This Time)
4- ID Any Email Enabled Applications(Spiceworks)
5- D Any Email Enabled Hardware(scanners)
6- ID The Domain(s) Name(s) to be migrated
7- Does The Client Have At Least 2008 R2 Member Server For DirSync?
8- What Is The Local AD Domain Name (*.local)
9- What OS Flavor Does The Workstations Have?
10- What Version Of Office Are End Users Working With?
11- Who Hosts External DNS For The Domains Being Migrated
12- Is The Client Using Spam Filtering Service (MX Logix, AppRiver)
13- Is The Client Using Any Email Archiving Service?
14- ID How You Are Going To Gain Remote Access Into The Servers(LogMeIn, RDP)

Step 2: Get DNS Login

Request Login and verify DNS zone file access so you can update External DNS when needed.

Step 3: Get Domain Admin Login to Exchange and DirSync Servers

Get client to provide you with domain admin login and have them spin up a separate DirSync VM for you to use to connect AD to Office 365. Attach it to the domain as a member server and run all Windows updates. Then Install Remote Administration Features Via Server Manager for AD Users and Computers and DNS

Step 4: Two Weeks Before Migration

Two weeks before the migration begins verify again you have Domain admin remote access to the two servers you need.
Verify again DNS Zone Login so you can update DNS
Setup Office 365 Account for the client with the number of users needed and what ever plan they decided on.
Be sure to give them your partner of record number so they can give you credit for the sale with MS.

Step 5: Two Weeks Before Migration – Clean Up AD

Login to the client Domain Controller and go through all the subset of users that will be migrated to Office 365. Verify the Exchange Advanced tab for the user has the simple display name as the email user. the display name is the bit before @.
On the same tab add the user you created for DirSync service with domain admin and enterprise admin rights to each mailbox that will be moved so that it has full access rights to get in and copy the email over.

Step 7: Setup Account (Optional)

As a precaution against DNS record issues I have the end user setup a free account and populate that with the domain(s) and the proper dns entries for all the services, switching the ones to do with Office 365 to what they should be after the migration. I have this staged incase something goes wonky with the current DNS provider I can just switch Name Servers at the Registrar and get mail flowing.

Step 8: Merge Mailboxes At This Time

If you want to merge any mailboxes like support or info then you should do this now on the existing Exchange server before you migrate to the cloud. Adjust your CSV dump as needed to remove the mailboxes you merged leaving only the one you want.

Step 9: Export AD Users To CSV

Use the following command to dump the existing AD users email list to a CSV. Then send this over to the client and have them delete the ones that do not need mailboxes or licenses assigned to them on Office 365. Open CMD on the exchange 2003 server.
Change the directory to one you know then copy paste the command into the DOS prompt and hit enter to run it.

Step 10: CSVDE Command

csvde -m -f AD-Email-Dump.csv -r “(&(objectClass=user)(mail=*))” -l “displayname,mail”

Step 11: Clean up CSV dump

Open the CSV file in Excel and delete the columns for DN and Displayname leaving only the mail column with the email addresses. Rename the email column to EmailAddresses

Save this CSV as an Excel Sheet with the prefix OriginalDump-companyusers.xlsx and send it to your contact at the client and have them delete all the emails that are not going to be migrated to Office 365

Take this clean list and cleanout all the white spaces by sorting, then save the file as CSV with a new file name prefix CleanList-companyusers.csv

Save this list as it will be needed twice during the migration.

Step 12: Setup Migration Batch

Login to the office 365 portal with the admin account and navigate to Exchange, Recipients then Migration.
Hit the three dots … and setup the migration endpoint to connect to your existing Exchange server.
For Exchange 2003 you do not have any Autodiscover features so you need to define the URL where to find the Exchange server. After you key in the user name that has access rights to all the mailboxes you will hit next and then you will enter the login / email address of the user and the user name to use to login. Right below that is a More Options link that will allow you to key in the URL of the Exchange server. Enter all this info and hit next to try the login. If it does not pass or gives errors then either the user you are working with does not have a Mailbox on the Exchange server(requirement) or the user does not have full access rights / domain admin rights on the server or mailboxes.
Use Test Exchange Connectivity to fix any errors at this time. You need to have a 3rd party SSL cert for this to work so if you have one that is self signed you are not going to get this working.

Once the endpoint is set then you can proceed to setup the Migration batch using the CSV dump you created earlier.

Back on the main Exchange, Recipients then Migration screen hit the Plus sign to create the new migration batch.
Step through the wizard browsing to the Clean CSV dump of the users email addresses, choose the option to manually start the migration and hit finish.

Step 13: Migration Weekend

Go through the CSV and assign the needed Licenses on the Office 365 portal for Exchange and what ever other services you subscribed to.

Start on a Friday as early as possible doing about 45 -50 users each batch and let it run; keeping an eye on the sync via the office 365 portal. This will take a day or two depending on the size of the mailboxes and speed of the internet upload at the site.
Once this completes sync then you can proceed to the next step

Step 14: Convert AD Exchange 2003 Users

Once the migration batch is completed you can then proceed to update AD properties removing the Exchange 2003 and replacing it with the Office 365 pointers.

Step 15: Convert Users – Download Scripts

Export Migrated Users AD Info From Office 365

Update Users In AD With Downloaded AD Info From O365

Create a new folder

Download the files Unzip the one and change the file extension of the other to ps1 as per the instructions on the download page
You must install the appropriate version of the Azure AD Module for Windows PowerShell for your operating system from the Microsoft Download Center:
Azure Active Directory Module for Windows PowerShell (32-bit version)
Azure Active Directory Module for Windows PowerShell (64-bit version)

Step 16: Convert Users – Office 365 Powershell

Login to the DirSync server and open Powershell (run as administrator)
Connect to Office 365

#Store Office 365 Admin Creds
$UserCredential = Get-Credential

#Connect to Office 365
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri -Credential $LiveCred -Authentication Basic -AllowRedirection

#Import the session commands
Import-PSSession $Session

#Set Execution Policy Unsigned so you can run the scripts
Set-ExecutionPolicy Unrestricted

Step 17: Convert Users – Export Migrated User Settings From Office 365

Once connected to Office 365 via the powershell steps above then you will need to run the ExportO365UserInfo.ps1 script and dump that to CSV for use in the next step.
We use the orginial CSV migration list to get the subset of users we want. copy the migration.csv file clean list into the scripts folder on the DirSync Server.
# In PowerShell After Connecting To Office 365
CD C:\Scripts
.\ExportO365UserInfo.ps1 .\migration.csv

# Once this is run you should see a cloud.csv file in the c:\scripts folder on the DirSync Server where you ran this powershell script.

Step 18: Convert Users – Import User Settings Into AD – Mail Enable Users

copy the whole scripts folder over to the old Exchange 2003 server then remote into the old Exchange 2003 server to run the vbs script.
Open the DOS prompt on the exchange server, change fqdn.domain.local to your FQDN of one DC on the LAN
CD C:\scripts
cscript Exchange2003MBtoMEU.vbs -c c:\scripts\cloud.csv fqdn.doman.local

Step 19: Change DNS Settings

After the Migration batch has finished you then need to change both internal and external DNS for the switch over to Office 365 mail.

On both the external and internal DNS zone file you need to delete any A or Cname records with the following prefixes

Add The Following Cname Records
POP3 =
Msoid =
Sip =
Lyncdiscover =
Autodiscover =
Mail =

Delete Old MX Records and Add the one for Office 365
Remove all the old MX records and add the one listed in the domains section of your office 365 portal.

Add TXT Record
v=spf1 -all

Add SRV Records For Exchange Autodiscover and Lync
Host, Port, Priory, Weight, Domain, Points To
_sip._tls 443 1 100 3600 @
_sipfederationtls._tcp 5061 1 100 3600 @
_autodiscover._tcp 443 1 100 3600 @

Step 20: Delete The Migration Batch

Login to the office 365 portal and delete the migration batch to finalize the migration

Step 21: Repair Outlook Profiles

Most Exchange 2003 Outlook users will have the old server name hard coded into the account and in order for the autodiscover to work you need to go into the account properties and hit the option for repair outlook profile.
let that complete and it should update to the office 365 settings and keep on trucking.

Published: Sep 4th, 2014 · Last Updated: Oct 8th, 2014