Exmerge No More

Published on
9,811 Points
2 Endorsements
Last Modified:
Community Pick
I have been working with Exchange for over 10 years now and one of the best available tools was Exmerge. This utility could do a lot and saved me many times. Now with the release of Exchange 2007 and 2010 this tool is no longer supported. Instead you must use the Export-Mailbox cmdlet. Many professionals are disappointed and want Exmerge back. Others say that you can't do things with the Export-Mailbox cmdlet that you could do with Exmerge. Well, I hope that I can convince some of you that the Export-Mailbox cmdlet is as powerful, if not more, than Exmerge was.

[b]Export Mailbox to PST[/b]
This is one of the most basic tasks performed with Exmerge and was most often done during migrations. The one major issue with using Exmerge to complete this tasks was that it could only run four thread simultaneously. And how many times did you start an Exmerge task for a large number of mailboxes and three out of four of those thread completed with several mailboxes remaining. This was very frustrating and added time to the project. Another limitation for Exmerge when using the GUI was you could only move mailboxes from one server during the task. You could overcome this limitations by running Exmerge from the command line. Don't tell me you didn't know you could run Exmerge from the command line and script tasks.

Now with the Export-Mailbox cmdlet you can export mailbox quicker and more efficiently. This cmdlet allows you to specify the number of threads you want to run simultaneously (the default value is still four, and in most cases should not be much higher). Unlike Exmerge, once a thread completes an export of a mailbox, another mailbox is started until all mailboxes are processed. There are also several different ways you can input the mailboxes to export. Here are a few examples of the Export-Mailbox cmdlet:
##This example exports a single mailbox into a PST file
Export-Mailbox jim -PSTFolderPath D:\

##This example takes a text file and exports the mailboxes listed into PST files
Get-Content C:\Mailboxes.txt | Export-Mailbox -MaxThreads 6 -PSTFolderPath D:\

##This example exports all mailboxes within a database into PST files
Get-Mailbox -Database DB1 | Export-Mailbox -PSTFolderPath D:\

Open in new window

[b]Removing Specific Messages[/b]
How many times did you get a call from someone saying "You need to remove this message from everyone's mailbox ASAP"? This was something Exmerge could do that has saved many administrator's lives. In most instances the subject of the message was known and you were able to complete this task. There were the occassional instances where a request to "remove all messages containing the word or phrase x". Sorry, but Exmerge couldn't help you with that task.

The Export-Mailbox cmdlet can also remove specific messages from mailboxes. It can export messages based on date or from specific folders. It can only export messages based on the content of the message body. Here are a few examples:
##This example removes messages based on subject and date/time from a single mailbox
Export-Mailbox jim -SubjectKeywords "Experts" -DeleteContent -StartDate "8/19/2010 7:00 AM"  -EndDate "8/19/2010 12:00 PM" -Confirm:$False

##This example removes messages based on subject from the Inbox of all messages on a mailbox server
Get-Mailbox -Server mail -ResultSize unlimited | Export-Mailbox -SubjectKeyWords "Confidential" -DeleteContent -IncludeFolders "\Inbox" -Confirm:$false

##This last example removes messages based on a words within the message body excluding the Inbox
Export-Mailbox jim -ContentKeywords "Answer","Assist" -DeleteContent -ExcludeFolders "\Inbox" -Confirm:$false

Open in new window

These are the two most common tasks that I have faced while supporting Exchange. I described the limitation seen when using Exmerge and how the Export-Mailbox cmdlet helps to overcome them. If you have other tasks that you have used Exmerge to complete and are not sure how you can accomplish it with the Export-Mailbox cmdlet I would like to hear from you. Please send any questions, comments, or suggestion to my email address jim at endital dot com. Thanks.

Featured Post

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Join & Write a Comment

A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
In this video I will demonstrate how to set up Nine, which I now consider the best alternative email app to Touchdown.

Keep in touch with Experts Exchange

Tech news and trends delivered to your inbox every month