Read time 5 minutes

The number of heavy attachments in emails is one of the reasons for the large size of Exchange database. Emails, when sent without attachments, may not take much space. But when email messages are attached with documents, images, etc., they consume a lot of storage space. If more and more messages are sent and received with large attachments, the Exchange Database becomes large in size. And these attachments can raise the database size to many Gigabytes. And finally, it could affect the performance of Exchange Server and lead to corruption of Exchange database files.

How to deal with large email attachments?

To reduce the size of Exchange database files, the user’s first step should be move or export email attachments to other location from the Exchange database. This action would free some space from the Exchange database. Some manual methods to remove attachments in different Exchange versions are:

Extract attachments using ExMerge utility

Microsoft offers a free utility, ExMerge, to extract the Exchange data along with the attachments. This tool can be downloaded from the Microsoft website itself. Generally, with Exchange Server 2000, 2003, 2007 versions, ExMerge utility can be used.

How to use ExMerge utility?

Before running this utility, Exchange user account must be assigned full mailbox rights over the user mailboxes. Now, download the ExMerge utility from the Microsoft website, install it on your system and launch it. You can just follow the on-screen instructions to complete the process.

  1. Launch the ExMerge utility and click Next till Procedure Selection wizard is displayed. Now select Extract or Import (Two Step Procedure) and click Next.
  2. In this wizard, specify your Exchange Server name, and click Options.
  3. In the Data tab, select the checkbox User messages and folders and click OK.
  4. In the Import Procedure tab, select Archive data to target store.
  5. Click on the Message Details tab and specify the document format (.doc. .pdf. .xls, etc.) to extract from emails. Then click OK. Click Next to continue.
    Launch the ExMerge utility
  6. Now click Select All to select all the items and again click Next.
  7. In the opened window, make a selection of the desired locale.
  8. In the next dialogue box, provide the destination PST file location and click Next.
  9. Click Save Settings button to save the settings of the export process and finally click Next.

The export process gets completed soon depending on the amount of the data exported.

Definitely ExMerge utility comes free, but has many limitations on data, i.e. target PST file size is limited to 2 GB and the entire message is exported along with the attachments (attachments are not exported separately) with this process.

Extract attachments using Exchange Management Shell

Another way to extract attachments is using Exchange Management Shell. For this, Export-Mailbox PowerShell commands can be used with Exchange 2007. To use these cmdlets, the user must have full access permissions on user mailboxes. The user account should have Exchange Administrator role and should be a member of the local Administrators group.

Run the following command to extract the messages with attachments:

Get-Mailbox | Export-Mailbox -AttachmentFilenames “*.DOC” -PSTFolderPath C:\Attachments.pst –DeleteContent

When you execute this command, all the messages containing .doc files will be moved to the specified location C:\Attach.pst and removed from its earlier location.

For later versions like Exchange 2010, 2013, 2016, users can use a different set of cmdlets. Use this command to assign the rights:

New-ManagementRoleAssignment –Role “Mailbox Import Export” –User Administrator

Now, export the attachments using the following command:

Get-Mailbox | New-MailboxExportRequest -ContentFilter {Attachment -like “*.DOC”} -FilePath “\\SERVER01\PSTShare\Attachments.pst

All the messages with attachments having a .doc extension are now saved to Attachments.pst file located in the shared folder named PSTShare. The exported messages are not deleted from the source location though.

Need an easier solution to extract attachments from Exchange emails?

After going through these manual solutions, users would have understood that extraction of attachments from messages is possible, but the methods are not at all handy to use. They definitely require technical know-how about how to use PowerShell commands and ExMerge utility. To avoid these issues, users can go for another option of recovery software. With this powerful Kernel for Exchange Server recovery software, users can save attachments to the desired location in PST format.

Let us understand how the tool helps in easily extracting attachments from Live Exchange.

  1. First, launch the software and select the Offline EDB File option.
  2. Note: You can add live Exchange Server also as a source.

  3. Then browse and add the desired EDB file and click Next.
  4. When the EDB file data is displayed, right-click on any desired mailbox and click Extract Attachments.
    Go for Extract Attachments
  5. A dialogue box will get opened. Here, you can select the folders for extracting attachments, apply Item Type and Date Range filters and provide the destination location. Then click Extract to start the process.
    set filter and extract to start process
  6. After the extraction is completed, you will get information via message.
    extraction is completed

So, as you have seen, extracting attachments from offline EDB file or live Exchange is easy with Kernel for Exchange Server Recovery software.


The article throws light on the manual methods (ExMerge utility and PowerShell commands) for removing or extracting attachments from live Exchange. It discusses the limitations of the features as well. A suggestion (third-party tool) for the foolproof extraction of attachments from the Exchange messages is also provided.

Kernel for Exchange Server