• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to secondary sidebar
OpenTechTips

OpenTechTips

Comprehensive IT Guides for Pros and Enthusiasts

MENUMENU
  • HOME
  • ALL TOPICS
    • Exchange
    • InfoSec
    • Linux
    • Networking
    • Scripting
      • PowerShell
    • SSL
    • Tools
    • Virtualization
    • Web
    • Windows
  • ABOUT
  • SUBSCRIBE
Home » Office365 to Office365 Migration for FREE – Step by Step » Page 5

Office365 to Office365 Migration for FREE – Step by Step

March 21, 2020 - by Zsolt Agoston - last edited on January 17, 2021

Strip down the old tenant

As a next step we remove of our business domains from the source tenant and add them to the target. In our example it is a single domain: jd0e.com

Office365 to Office365 Migration for FREE – Step by Step

After removing opentechtips.com domain from the jd0e.onmicrosoft.com tenant we add that to agzsolt.onmicrosoft.com

Office365 to Office365 Migration for FREE – Step by Step

Perfect!

Now to sort the public folders we simply create a jd0e.com subfolder in the local Public Folder database and import the PF.pst file there

Office365 to Office365 Migration for FREE – Step by Step

Perfect!

Sorting the post-migration tasks: permissions check, distribution lists and contacts creation

Amazing news that the mailbox permissions are inherited, they were mirrored during the migration so we don’t need to worry about that

Office365 to Office365 Migration for FREE – Step by Step

Send-as permissions are moved through as well:

Office365 to Office365 Migration for FREE – Step by Step

Now we create the distribution groups with the right useraccounts

import-csv distro-list.csv | foreach {
 $SAM=$_.SamAccountName
 $name=$_.DisplayName
 $win=$_.WindowsEmailAddress
 New-DistributionGroup -Name $name -DisplayName $name -PrimarySmtpAddress $win -Type distribution -IgnoreNamingPolicy:$true -ModerationEnabled:$false -OrganizationalUnit "OU=DGs,OU=opentechtips.com,OU=My Business,DC=agzsolt,DC=com" -Confirm:$false
 Set-DistributionGroup -Identity $win -RequireSenderAuthenticationEnabled:$false
 }

Populate with the members:

import-csv distro.csv | foreach {
 $group=$_.Group
 $member=$_.PrimarySmtpAddress
 Add-DistributionGroupMember -Identity $group -Member $member -Confirm:$false
 }
Office365 to Office365 Migration for FREE – Step by Step

And to finish the process, we create the contacts:

import-csv contacts.csv | foreach {
 $name=$_.Name
 $disp=$_.DisplayName
 $fn=$_.FirstName
 $ln=$_.LastName
 $email=$_.WindowsEmailAddress
 New-MailContact -Name $name -DisplayName $disp -FirstName $fn -LastName $ln -ExternalEmailAddress $email -OrganizationalUnit "OU=Contacts,OU=jd0e,OU=My Business,DC=agzsolt,DC=com" -Confirm:$false
 }

From this point it’s a normal migration to the cloud scenario.

MIGRATE BACK TO THE CLOUD

That’s the easy and well documented part of our job, first we create the migration endpoint in the cloud server, just like we did the first time on the source tenant. This time we do the exact same steps, and we call this endpoint “agzsolt” as well.

An important thing is to move the OU that contains all the migrated accounts to an OU that is a synced OU so the users will appear in the tenant!

Move-ADObject -Identity "OU=opentechtips.com,OU=non-syncing,OU=My Business,DC=agzsolt,DC=com" -TargetPath "OU=synced,OU=My Business,DC=agzsolt, DC=com"

We create a file called UpToTheCloud.csv and start the migration batch:

UpToTheCloud.csv
EmailAddress
 Ross@jd0e.com
 Joey@jd0e.com
 Monica@jd0e.com
 Rachel@jd0e.com
 Chandler@jd0e.com
 Phoebe@jd0e.com
 Janice@jd0e.com
 CentralPerk@jd0e.com
Script:
New-MigrationBatch -Name "Up Back To The Cloud" -SourceEndpoint "agzsolt" -BadItemLimit unlimited -TargetDeliveryDomain agzsolt.mail.onmicrosoft.com -CSVData ([System.IO.File]::ReadAllBytes("C:\UpToTheCloud.csv"))
Office365 to Office365 Migration for FREE – Step by Step

Start the migration

Office365 to Office365 Migration for FREE – Step by Step

Now it’s time to complete the migration batch

Office365 to Office365 Migration for FREE – Step by Step

After the batch is done we can see the mailboxes finally appearing in the cloud

Office365 to Office365 Migration for FREE – Step by Step

I personally prefer changing the SCP record for autodiscover in the jd0e.com domain to https://autodiscover-s.outlook.com/Autodiscover/Autodiscover.xml which makes faster discovery at later profile creations, but this step can be omitted.

 

The clients will receive another notification of the background changes after which they need to restart Outlook again and we are done!

Office365 to Office365 Migration for FREE – Step by Step

Tidying up

We still have a few things to sort:

  1. We assign the appropriate licenses to the migrated accounts
Office365 to Office365 Migration for FREE – Step by Step
import-csv users.csv | foreach {
 $fn=$_.FirstName
 Set-MsolUser -UserPrincipalName "$fn@jd0e.com" -UsageLocation "GB"
 Set-MsolUserLicense -UserPrincipalName "$fn@jd0e.com" -AddLicenses "agzsolt:ENTERPRISEPACK"
 }

2. The public folders need to be moved to the cloud. Again, Microsoft’s solution is a pretty cumbersome way, since the mailbox database is pretty small I use a simple client to export them in a PST file and import it back to a cloud managed PF mailbox.

After migrating back to the cloud, the mobile phones will start working again. In few cases users are prompted for their passwords by the device after which the connection goes back to normal.

Office365 to Office365 Migration for FREE – Step by Step

We are done!

Zsolt Agoston

17/02/2018

Pages: Page 1 Page 2 Page 3 Page 4 Page 5

Primary Sidebar

Tools

Secondary Sidebar

CONTENTS

  • The starting scenario
  • Mailbox situation:
  • Prepare the destination on-prem server
  • Change the jd0e.com MX record to point to the agzsolt.com on-prem server
  • Disable Federation
  • Cut opentechtips.com dirsync (can take up to 72 hours to complete), or…
  • Create jd0e.com users in the agzsolt.com local AD in a non-synced OU
  • users.csv
  • Configure the cross-forest hybrid environment
  • Sync the MSOL attributes into the agzsolt.com local AD accounts
  • Migrate users to agzsolt.com on-prem
  • Strip down the old tenant
  • Sorting the post-migration tasks: permissions check, distribution lists and contacts creation
  • MIGRATE BACK TO THE CLOUD
  • UpToTheCloud.csv
  • Script:
  • Start the migration
  • Now it’s time to complete the migration batch
  • Tidying up

  • Terms of Use
  • Disclaimer
  • Privacy Policy
Manage your privacy

To provide the best experiences, we and our partners use technologies like cookies to store and/or access device information. Consenting to these technologies will allow us and our partners to process personal data such as browsing behavior or unique IDs on this site and show (non-) personalized ads. Not consenting or withdrawing consent, may adversely affect certain features and functions.

Click below to consent to the above or make granular choices. Your choices will be applied to this site only. You can change your settings at any time, including withdrawing your consent, by using the toggles on the Cookie Policy, or by clicking on the manage consent button at the bottom of the screen.

Functional Always active
The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
The technical storage or access that is used exclusively for statistical purposes. The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.
Statistics

Marketing

Features
Always active

Always active
Manage options Manage services Manage {vendor_count} vendors Read more about these purposes
Manage options
{title} {title} {title}
Manage your privacy
To provide the best experiences, we use technologies like cookies to store and/or access device information. Consenting to these technologies will allow us to process data such as browsing behavior or unique IDs on this site. Not consenting or withdrawing consent, may adversely affect certain features and functions.
Functional Always active
The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
The technical storage or access that is used exclusively for statistical purposes. The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.
Statistics

Marketing

Features
Always active

Always active
Manage options Manage services Manage {vendor_count} vendors Read more about these purposes
Manage options
{title} {title} {title}