question

LeighHarding-2757 avatar image
0 Votes"
LeighHarding-2757 asked LeighHarding-2757 commented

Duplicates are being imported

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://docs.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?

office-exchange-server-administrationoffice-exchange-online-itprooffice-exchange-server-mailflowoffice-exchange-hybrid-itprooffice-exchange-server-itpro
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

KyleXu-MSFT avatar image
0 Votes"
KyleXu-MSFT answered

@LeighHarding-2757

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.


1234.gif (134.5 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

LeighHarding-2757 avatar image
0 Votes"
LeighHarding-2757 answered LeighHarding-2757 commented

@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.

· 5
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

It sounds weird, I would confirm more information with you:
1. How do you export data to the PST file?
2. Do you export data from from one mailbox, then import to another mailbox?
3. Whether all emails show twice?

II think this phenomenon may related with the way that you export data. If you export data from mailbox A, then import A again, whether this phenomenon occurs?

0 Votes 0 ·

@KyleXu-MSFT
Thanks again for your response.

Some background first, the Exchange database became corrupted. A new empty database was created to allow email access and flow. Some users had cached Exchange mode enabled prior to the database corruption. These cached emails were exported to .pst using Outlook. These locally exported .pst files were then imported into the empty Exchange database and respective mailbox. Some users had only 3 months, while some had longer periods cached.

To answer your questions:
1. Veeam Backup & Replication was used to export mailboxes to .pst from the database at a time prior to the corruption, it was while importing these recovered .pst files that I am getting duplicates
2. Data was exported from a users mailbox, then imported into the same user's mailbox
3. Only those emails or contacts that were cached and exported using Outlook are showing duplicates, ie 3 months is some cases, longer in others


0 Votes 0 ·

I think the export tool change the attributes of emails, then Exchange import command think those emails are different from original emails. So, duplicates occurs.

A little doubt: since database broken, why there still exist emails in mailbox? Since there exist emails in mailbox, why do you import data again? I would suggest you empty mailbox, then import just once.

0 Votes 0 ·

Any update about this thread now?

0 Votes 0 ·
Show more comments