Duplicates are being imported

LeighHarding 1 Reputation point
2021-06-22T01:42:59.563+00:00

Hello, I am using the New-MailboxImportRequest to import .PST files into existing mailboxes. These mailboxes have emails in them that are also included in the .PST file being imported. The import request completes successfully, some needing the BadItemLimit to be set. After importing the .PST file, I am noticing that duplicates have been created for emails and contacts. From this site, https://learn.microsoft.com/en-us/powershell/module/exchange/new-mailboximportrequest?view=exchange-ps I understand that duplicates are not imported. This is an example of the PowerShell command used: New-MailboxImportRequest -FilePath "\ServerName\FolderLocation\UserName.pst" -BadItemLimit 10 -Mailbox "UserName"
This is an on premiss Exchange 2016 server.
So, to my questions, How do I stop the duplicates from being imported? And How do I remove the duplicates for those already imported?

Microsoft Exchange Online Management
Microsoft Exchange Online Management
Microsoft Exchange Online: A Microsoft email and calendaring hosted service.Management: The act or process of organizing, handling, directing or controlling something.
4,209 questions
Exchange Server Management
Exchange Server Management
Exchange Server: A family of Microsoft client/server messaging and collaboration software.Management: The act or process of organizing, handling, directing or controlling something.
7,369 questions
Microsoft Exchange Hybrid Management
Microsoft Exchange Hybrid Management
Microsoft Exchange: Microsoft messaging and collaboration software.Hybrid Management: Organizing, handling, directing or controlling hybrid deployments.
1,901 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. KyleXu-MSFT 26,211 Reputation points
    2021-06-23T04:21:12.283+00:00

    @LeighHarding

    I think there exist copy in the PST file that you used to import. I would suggest you have a check about it before importing.

    By default, the import will could merger PST file with target mailbox.
    108434-qa-kyle-12-13-00.png
    Based on my testing, if there exist duplicate in the PST file, the import operation will not delete the duplicate from target mailbox.

    Such as:

    1. If there exist email "Tes54321" and a copy "Test54321" in a mailbox. If I export data and import data to this mailbox, there will exist 4 emails which called "Test54321".
    2. If there only exist an email "Test54321" and doesn't exist copy. If I export data and import data to this mailbox, there will only exist 1 email which called "Test54321"

    As a solution, you can use the Outlook "Clean Up“ function to delete all duplicates from this mailbox directly:
    108435-1234.gif


    If the response is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

  2. LeighHarding 1 Reputation point
    2021-06-24T03:05:39.62+00:00

    @KyleXu-MSFT
    Thanks for your suggestions.
    I can confirm there is only 1 email in the .pst file used during the import process. After the import, there are 2 showing in the mailbox.
    The Outlook Clean Up function is not removing the duplicated emails, both are still present.
    I have checked this with multiple PST files and mailboxes.
    The 2 emails in the mailbox show the same time and date, they both have the same content.
    Checking the Internet Headers for the duplicated emails shows both are the same.