Batch migration is a process where you need to migrate multiple Office 365 accounts from one account to another for various purposes such as a merger acquisition or rebranding. As an Office 365 admin, it is very difficult to do this because Microsoft doesn’t provide any software to do this.
Hence, in this post, we have explained the best possible solution to move Office 365 mailbox to another user account. So, let us begin.
Reasons for Transfer Mailboxes from One O365 Account to Another
There are several reasons why you may want to move an Office 365 mailbox to another user account:
- Employee turnover – When an employee leaves an organization, a new employee or manager needs to reassign their mailbox
- Reorganization – When a business is being restructured, the IT department may have to transfer mailboxes to other departments or managers.
- Mergers and acquisitions – While a merger or acquisition is taking place, consolidate and combine the mailboxes into a single account.
- Compliance – In certain cases, mailboxes need to be moved to meet compliance requirements or to support eDiscovery efforts.
- Improved collaboration – In some cases, moving a mailbox to another user account can improve collaboration and productivity within a team.
Last but not least, when a user cannot access or has a corrupted account, then..
Workaround Solution to Move Office 365 Mailbox to Another User Account
A user has to follow the given set of instructions to transfer Office 365 mailbox.
Step 1: Start to Plan Before 3 Days
Prepare Primary and Aimed Accounts: To make modifications to the processing accounts, follow these set of instructions:
- Make sure that a particular destination tenant is for the source Exchange Online domain.
- Add the source account to the destination Office 365 account. Create a TXT record when you are done with this.
- DNS record needs 72 hours to exhibit circulation
Office 365 Cross-Tenant Migration Platform Setup
- Generate a list of mailboxes to migrate
- Map the targeted and source tenant mailboxes, if it is required to include them.
Preparation of Office 365 Source Account
- Delete the Office 365 tenant’s targeted email ID wherever you have configured it
- Reset all the URLs to the initial point if the account configuration is complete
- Remove Microsoft Lync licensing with the help of the Lync admin portal
- Create a setting where the default email ID of the mailboxes of the targeted account has been entered. Once the procedure till now is complete, reset all the email addresses on rooms, distribution lists, and resources to the initial point.
Preparation of Office 365 Target Account to Move Office 365 Mailbox to Another User Account
- If you are using AD-FS then, launch the target Office 365 account and generate new domains within it.
- Grant all the permissions and licenses needed for migration to another new account for Office 365 tenant migration
- Establish the primary account as a basic mailing address
- If the user does not use the password sync feature or AD-FS, they must mention the password of every mailbox in the account domain.
- Check the mail flow to see how the account works in different environments.
Step 2: Change the Passwords in the Batch
- Launch an Excel spreadsheet generate a CSV file and name it ‘password.csv’
- In this Excel file, make two columns with the name ‘upn’ and ‘password’
- Insert all the account credentials in this sheet
- Run the MS Exchange PowerShell window and execute the following command to perform Office 365 tenant-to-tenant migration:
Import-Csv password.csv|%{Set-MsolUserPassword –userPrincipalName $_.upn -NewPassword $_.newpassword -ForceChangePassword $false}
Step 3: Copy the Messages To Move Office 365 Mailbox to Another User Account
Execute these PowerShell commands to start copying messages from the basic domain to any particular proxy addresses present in the CSV file:
# Script: showproxies.ps1 # Copies all accounts in Office 365 that contain/don't contain a specific # proxyaddress to a .CSV file (addresses.csv) # # Change the following variable to the proxy address string you want to find: # $proxyaddr = "onmicrosoft.com" ################################################################################ $proxyaddr = "onmicrosoft.com" # Create an object to hold the results $addresses = @() # Get every mailbox in the Exchange Organization $Mailboxes = Get-Mailbox -ResultSize Unlimited # Loop through the mailboxes ForEach ($mbx in $Mailboxes) { # Loop through every address assigned to the mailbox Foreach ($address in $mbx.EmailAddresses) { # If it contains XXX, Record it if ($address.ToString().ToLower().contains("onmicrosoft.com")) { # This is an email address. Add it to the list $obj = "" | Select-Object Alias,EmailAddress $obj.Alias = $mbx.Alias $obj.EmailAddress = $address.ToString() #.SubString(10) $addresses += $obj } } } # Export the final object to a csv in the working directory $addresses | Export-Csv addresses.csv -NoTypeInformation # Open the csv with the default handler Invoke-Item addresses.csv ##### END OF SHOWPROXIES.PS1
Step 4: For Office 365 Tenant, Create a Room Mailbox
Follow these commands to perform Office 365 cross-tenant migration:
Script: create-rooms.ps1 # Description:*** RUN THIS SCRIPT FROM A WINDOWS POWERSHELL SESSION *** #This script creates Room mailboxes in Office 365. # Syntax:Create-Rooms.ps1 -inputfile "file name.csv" # # Dependencies: Input file should contain 3 columns: RoomName, RoomSMTPAddress, RoomCapacity # ################################################################################ param( $inputFile ) Function Usage { $strScriptFileName = ($MyInvocation.ScriptName).substring(($MyInvocation.ScriptName).lastindexofany("\") + 1).ToString() @" NAME: $strScriptFileName EXAMPLE: C:\PS> .\$strScriptFileName -inputfile `"file name.csv`" "@ } If (-not $inputFile) {Usage;Exit} #Get MSO creds and initialize session If ($cred -eq $NULL) {$Global:cred = Get-Credential} # If ($ExchRemoteCmdlets.AccessMode -ne "ReadWrite") { Write-Host Write-Host Connecting to Office 365... Write-Host $NewSession = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell -Credential $cred -Authentication Basic -AllowRedirection $Global:ExchRemoteCmdlets = Import-PSSession $NewSession } #Import the CSV file $csv = Import-CSV $inputfile #Create Rooms contained in the CSV file $csv | foreach-object{ New-mailbox -Name $_.RoomName -room -primarysmtpaddress $_.RoomSMTPAddress -resourcecapacity $_.RoomCapacity } ##### END OF CREATE-ROOMS.PS1
Step 5: Delete The Secondary Addresses from Office 365 Mailboxes
Run the following commands:
#Script: remove-proxy.ps1 #Description:*** RUN THIS SCRIPT FROM A WINDOWS POWERSHELL SESSION *** #This script will remove a secondary email address from many users # # Syntax:remove-proxy.ps1 -inputfile "filename.csv" # # Dependencies:Input file should contain 2 columns: Username, Emailsuffix # Example: Username=tim, Emailsuffix=fabrikam.com #Script will remove the address tim@fabrikam.com from the mailbox for Tim. #NOTE: Address must be secondary; it will not remove primary email address. # ################################################################################ param( $inputFile ) Function Usage { $strScriptFileName = ($MyInvocation.ScriptName).substring(($MyInvocation.ScriptName).lastindexofany ("\") + 1).ToString() @" NAME: $strScriptFileName EXAMPLE: C:\PS> .\$strScriptFileName -inputfile `"file name.csv`" "@ } If (-not $inputFile) {Usage;Exit} #Get MSO creds and initialize session If ($cred -eq $NULL) {$Global:cred = Get-Credential} # If ($ExchRemoteCmdlets.AccessMode -ne "ReadWrite") { Write-Host Write-Host Connecting to Office 365... Write-Host $NewSession = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell -Credential $cred -Authentication Basic -AllowRedirection $Global:ExchRemoteCmdlets = Import-PSSession $NewSession } #Import the CSV file and change primary smtp address $csv = Import-CSV $inputfile $csv | foreach-object{ # Set variable for email address to remove $removeaddr = $_.username + "@" + $_.emailsuffix Write-Host ("Processing User: " + $_.UserName +" - Removing " + $removeaddr) Set-Mailbox $_.Username -EmailAddresses @{Remove=$removeaddr} } ##### END OF REMOVE-PROXY.PS1
The Final Verdict
Various Office 365 users have demanded an answer to their query, i.e., “How to move the mailboxes from one account to another?” The post deals with the best possible solution to perform this operation without any data loss or downtime. Moreover, users can use the free trial of the above-mentioned tool to migrate two users’ accounts for free.
FAQs for Users who Wants to Move Office 365 Mailbox to Another User Account
Q. How do I move my mailboxes from one Office 365 account to another?
Make sure you plan your move at least 3 days ahead of time, set up your source and target accounts correctly, create CSV files with all the information you need, and set up your permissions and licenses.
Q. What if I have multiple Office 365 tenants and I need to migrate my mailboxes across them?
To manage multiple Office 365 Tenants or migrate mailboxes there are a few things you need to keep in mind. These include setting up new domains, granting permissions, and ensuring proper mail flow
Q. How long does it typically take to migrate a mailbox between Office 365 accounts?
The time taken for migration depends on factors such as mailbox size, network speed, and server load, but it usually completes within a few hours.
Q. What happens to emails you receive while your migration is in mid-process?
The emails you get during your migration will be added to a queue and sent to your new inbox once your migration is finished.