Migrating Mailboxes from Hotmail or Gmail to Microsoft Exchange Online (BPOS)

There are many users who are still having all their mails Gmail or Hotmail and have currently opted for Microsoft Online. Thus if they want to move their mails from Gmail or Hotmail account to the Microsoft Online account we have two options here

Method 1 (Manual Method):

  1. Configure your Outlook (if its not preconfigured) with the Gmail or Hotmail account and copy all the emails from the Hotmail/Gmail to a PST.
  2. Now Configure a new Outlook profile with Exchange Online or use the Single Sign On Client to get your Outlook client configured.
  3. Attach the PST again (File > Open > Outlook Data File) and copy the emails from the PST to your Exchange Online account.

Method 2 (Using PowerShell):

Although the method explained above is relatively simple in terms of whats happening, but it requires a lot of steps for the task to be executed. So to make the mails migrations a little simple, we have use the Powershell or the Migration Command Shell.

  1. Make sure that you have a user with a valid Microsoft Online Account. You can also have a trial account if you don’t have a paid one. Check out this link
  2. The most important step is to have Directory Synchronization enabled on the Microsoft Online. (Check screenshot below)


  3. Download and install the Microsoft Online Services Migration Tools. You can download it from here 32 bit and 64 bit
  4. For installing the Microsoft Online Services Migration Tools, make sure that the following criteria is met
    1. Windows PowerShell is installed.
    2. Microsoft Management Console (MMC) version 3 is installed
    3. OS : Windows Vista, 7, XP with SP2 or later or Windows Server 2003
    4. Microsoft .NET Framework 2.0 or later.
  1. Once installed, launch the Migration Command Shell by going to Start > All Programs > Microsoft Online Services > Sign In
  2. Once in the Migration Command Shell, type in the following commands for hotmail or Gmail respectively. and be patient as it takes some time to move all the mails from Gmail/hotmail to Microsoft Online account (depending upon the mailbox size on Gmail or hotmail)
  3. The one in bold needs to be changed
    1. Sourceidentity : Your gmail or hotmail email address
    2. SourceLoginID : Again, your gmail or hotmail email ID
    3. Sourcepassword : Your Gmail or hotmail password (make sure that there are no quotes after Sourcepassword)
    4. Targetidentity : Your email address for Microsoft Online Services. (even if you have verified other domains, still I would suggest using the default email address, as I have used)
        1. Migrate Gmail to Exchange Online:

          Move-XsPOPMailboxToExchangeOnline -sourceidentity "hsk1313@gmail.com" -sourceserver "pop.gmail.com" -SourceLoginID "hsk1313@gmail.com" -sourcepassword "PASSWORD" -targetidentity "admin@hsk13.apac.microsoftonline.com" -targetcredential (get-credential)

          Migrate Hotmail to Exchange Online:

          Move-XsPOPMailboxToExchangeOnline -sourceidentity "hsk13_13@hotmail.com" -sourceserver "pop3.live.com" -SourceLoginID "hsk13_13@hotmail.com" -sourcepassword "PASSWORD" -targetidentity "admin@hsk13.apac.microsoftonline.com" -targetcredential (get-credential)




          • But do remember, that only the inbox would be migrated to the Microsoft Online and not your Contacts or Calendar.
          • Only the email address and password is needed on the gmail or the hotmail account for the migration to be completed
          • Keep a eye on the warning or error messages as they would help you in understanding what went wrong

          Some useful resources: