Forum Discussion

NetSysEngMN's avatar
NetSysEngMN
Brass Contributor
Mar 13, 2021

Exchange 2010 to Exchange Online Public Folder Migration Failed

Looking for any advice on an issue that I am facing. Currently in process of migrating from Exchange 2010 to Exchange Online and everything has gone relatively well up to this point. I have successfully migrated all user mailboxes (around 950 users) and everything is working as expected. The last step is too migrate Public Folders and I am following the Batch Migration instructions.

 

I've ran all of the scripts and walked through each step without too much trouble (the only "issue" being the SourceSideValidations.ps1 script took 5 days to run). The problem is that after successfully creating the migration batch and starting it, the job fails right away with the error "MigrationMailboxNotFoundException. The migration mailbox for the organization is either missing or invalid.".

 

There are 52 public folder mailboxes that were created in the 'Create Public Folder mailboxes in Exchange Online" step (we have a fair amount of data and number of public folders). In the Migration job - it lists all 52 public folder mailboxes and everyone has a failed status with that same error message. Given the error "MigrationMailboxNotFoundException" I am not sure if that is in reference to the public folder mailbox that was created in Exchange Online or if its referring to something wrong with the on-prem side.

 

The public folder mailboxes that were created in Exchange online seem okay - in that I can see all of them in the admin console and get the details with PowerShell using 'Get-Mailbox -PublicFolder -Identity "Mailbox1" for example. One thing I am not sure of if this is normal, but each public folder mailbox that was created has the correct display name (Mailbox<#>) but its SMTP address is like "Mailbox1_eb1aeb70@<domain>.onmicrosoft.com". I tried deleting the migration job and adding it again with the same results. When looking at the PublicFolder Migration end point that all seems fine.

 

I ran an Outlook connectivity test and it all passes.

When looking at the Migration report (Get-MigrationBatch -Identity "PublicFolderMigration" -IncludeReport) it doesn't show much useful information:

 

....migration user 'Mailbox1' created. (one line like this for every public folder mailbox)

...The migration batch processor ActiveMigrationJobProcessor finished with the result 'Working' after 00:00:01.0424004. Processed 0 migration users, which underwent the following transitions:
'StatusValidating -> 52'.

...The migration batch processor ActiveMigrationJobProcessor finished with the result 'Completed' after 00:00:00.0059958. Processed 0 migration users, which underwent the following transitions: ''.

...User 'Mailbox1' failed migration. (one line like this again for each mailbox).

 

I just have no idea where to start looking to trouble shoot this issue so if anyone has come across the same problem or has any advice on where or what I should be looking at all advice is appreciated.  

 

  • Support got back to me and said this error can happen if the Public Folder name and the Display Name do not match. To check the names in PowerShell: Get-Mailbox -PublicFolder Mailbox1 | fl name,displayname

    If mismatched (like mine are), I wrote the following PowerShell script to rename all of the public folder mailboxes to match the display name. If you only have a couple of mailboxes you could also just rename them in the EAC.

    # Connect to EXO
    $Credential = Get-Credential
    Connect-ExchangeOnline -Credential $credential -ShowProgress $true

    # Get all public folders
    $PFM = Get-Mailbox -PublicFolder | Select-Object Name,DisplayName

    # Loop through each public folder
    ForEach ($M in $PFM){
    # Define the mailbox display name
    $MBDN = $M.DisplayName
    # Define the mailbox name
    $MBN = $M.Name
    # Compare the name vs. display name
    If ($MBN -ne $MBDN){
    Write-Host "Name mismatch! Updating $MBDN now." -ForegroundColor Yellow
    # Rename the mailbox to match the display name
    Set-Mailbox -PublicFolder $MBDN -Name $MBDN
    }
    ElseIf ($MBN -eq $MBDN){ Write-Host "$MBDN is set correctly." -ForegroundColor Green}

    }

    I'm sure there is better/more efficient code but that worked for me. After the mailboxes have been renamed, try resuming the failed mailboxes and see if they start syncing as expected. In my case (still monitoring it) they at least did not fail right away so I believe it's working but only time will tell.
  • Nemi83's avatar
    Nemi83
    Copper Contributor

    Hi there,

    seems like I am in the exact same situation... migrated all user/ressource/shared mailboxes successfully.

    Did the preparations for the public folders exactly as mentioned in the guides from Microsoft https://docs.microsoft.com/en-us/exchange/collaboration/public-folders/migrate-to-exchange-online?view=exchserver-2019#step-5-start-the-migration-request , but once I start the migration job I get this error:

    Error: MigrationMailboxNotFoundException: Das Migrationspostfach für die Organisation fehlt oder ist ungültig.

    Running Exchange 2016 CU19

    Any advice!?

    • NetSysEngMN's avatar
      NetSysEngMN
      Brass Contributor
      Support got back to me and said this error can happen if the Public Folder name and the Display Name do not match. To check the names in PowerShell: Get-Mailbox -PublicFolder Mailbox1 | fl name,displayname

      If mismatched (like mine are), I wrote the following PowerShell script to rename all of the public folder mailboxes to match the display name. If you only have a couple of mailboxes you could also just rename them in the EAC.

      # Connect to EXO
      $Credential = Get-Credential
      Connect-ExchangeOnline -Credential $credential -ShowProgress $true

      # Get all public folders
      $PFM = Get-Mailbox -PublicFolder | Select-Object Name,DisplayName

      # Loop through each public folder
      ForEach ($M in $PFM){
      # Define the mailbox display name
      $MBDN = $M.DisplayName
      # Define the mailbox name
      $MBN = $M.Name
      # Compare the name vs. display name
      If ($MBN -ne $MBDN){
      Write-Host "Name mismatch! Updating $MBDN now." -ForegroundColor Yellow
      # Rename the mailbox to match the display name
      Set-Mailbox -PublicFolder $MBDN -Name $MBDN
      }
      ElseIf ($MBN -eq $MBDN){ Write-Host "$MBDN is set correctly." -ForegroundColor Green}

      }

      I'm sure there is better/more efficient code but that worked for me. After the mailboxes have been renamed, try resuming the failed mailboxes and see if they start syncing as expected. In my case (still monitoring it) they at least did not fail right away so I believe it's working but only time will tell.
      • TP_IT's avatar
        TP_IT
        Brass Contributor
        Thank you so much. Run in the same issue. The Script created the PF in EXO under: Name_random. Changing the name did not fixed the issue.
        The script did!
        Check the logs under:
        Exchange\Logging\HttpProxy\Ews
        inetpub\logs\LogFiles\W3SVC1
        you should see finally MRS Connections!
  • MDadarkar's avatar
    MDadarkar
    Brass Contributor

    Hi NetSysEngMN ,

     

    If you need to move your public folders to Exchange Online but your on-premises servers aren't running the minimum support versions of Exchange 2010 (minimum SP3 + RU8), Microsoft strongly recommends that you upgrade your on-premises servers and use batch migration, which is the only supported public folder migration method.

     

    Please go through with the below link.

    https://docs.microsoft.com/en-us/exchange/collaboration-exo/public-folders/batch-migration-of-legacy-public-folders 

     

    Thank you,

     

    Regards,
    MD

     

    please do like and share this post, if my answer resolved your issue..

    • NetSysEngMN's avatar
      NetSysEngMN
      Brass Contributor
      Thanks for your response MDadarkar,

      I am running a support version of Exchange 2010 and I am already following the batch migration process as I mentioned (and linked) in my original post.

Resources