Microsoft Exchange Server

Bulk Exporting of PST Files Using Exmerge

To automate the process of exporting Exchange mailboxes to .pst files, we’re going to use the exmerge tool using a Windows batch file. We can use a MAILBOXES.TXT file to choose which mailboxes we’ll be using and possibly a SUBJECTS.TXT or ATTACHMENTS.TXT to constrain our searches.

To run the exmerge, run as a typical GUI based merge but save the search. Once saved, you’ll be able to select a path, which we’ll call c:\tmpexmerge. In here, you should see an EXMERGE.INI as well as a MAILBOXES.TXT (and possibly a few other files.

In the MAILBOXES.TXT file you’ll see the CN information for the mailboxes selected in the previous:

/O=FIRST ORGANIZATION/OU=FIRST ADMINISTRATIVE GROUP/CN=RECIPIENTS/CN=CEDGE

You can copy and paste this line to add others, changing the last CN entry (or other pathing information if in other OUs:

/O=FIRST ORGANIZATION/OU=FIRST ADMINISTRATIVE GROUP/CN=RECIPIENTS/CN=WSMITH

Once you’ve saved the file, edit the EXMERGE.INI file if needed (you usually don’t need to edit this one. Then run exmerge.exe using the command line:

exmerge -F C:\tmpexmerge\EXMERGE.INI -B -D

This takes awhile, and even longer if you’re actually searching for keywords or doing multiple mailboxes, but not as long as it would take to do things manually. .PST files are saved using the file path in the exmerge.ini. Watch Task Manager to make sure the backup is still running. The -D option above opens the GUI exmerge to show what’s happening (kinda’).