WinDeveloper IMF Tune

WinDeveloper IMF Tune
WinDeveloper IMF Tune

Complete ExMerge Command-Line Control

Alexander Zammit

Alexander Zammit Photo

Software Development Consultant. Involved in the development of various Enterprise software solutions. Today focused on Blockchain and DLT technologies.

  • Published: Aug 15, 2006
  • Category: ExMerge
  • Votes: 4.7 out of 5 - 18 Votes
Cast your Vote
Poor Excellent

The command-line is the right interface to take full advantage of ExMerge. Here we combine it with ldifde.exe and exmergeini.exe to configure mailbox processing and facilitate batch process integration.

The ExMerge UI provides an interface to the options most relevant to a typical import/export operation. Getting away from the comfort of buttons, list controls et al, the command-line interface awaits us bringing better control and greater flexibility.

The command-line is the right environment for running unattended processes on a scheduled basis, or for the inclusion in any type of batch process. This is ideal to organizations using ExMerge to perform regular brick level backups.

Apart from increased flexibility, batch mode operation provides access to additional configuration options that the wizard interface does not expose. For example the UI only allows selecting mailboxes from one Exchange server. In batch mode, the ability to specify mailbox distinguished names overcomes this limitation.

In reality ExMerge supports a fairly limited set of command-line options. Most settings are configurable through an external INI file. Storing settings in an external file is quite advantageous. It allows us to start from an INI configured with the most typical settings. Thereafter individual ExMerge runs only require tweaking those values requiring customization.

The easiest way to generate the initial INI file is to run the ExMerge wizard, whose last step provides a 'Save Settings' button. This saves all the configured settings to exmerge.ini, ready for reuse.

ExMerge Save Settings

To start batch mode, the minimal ExMerge command-line is:
exmerge.exe -B

This causes ExMerge to silently load settings from exmerge.ini and perform the configured operation. A report on the process outcome is saved at exmerge.log.

Other supported command-line switches include:
-F for specifying the full path to the configuration INI file
-SRCSERV and -TGTSERV for specifying the source and target Exchange server(s) against which the export/import is performed
-D for displaying a progress window
-LOGMIN, -LOGMED and -LOGMAX for controlling the logging level
-NUMTHREADS for controlling the number of concurrent mailboxes processed

Typically I only use the -B and -F switches, passing all other settings through the INI file. The list of all possible INI file options is very long. The details are covered in the documentation included with ExMerge. So it is best to download (see references) and go through this document for more details.

The User Mailbox List

There are a few areas that tend to cause some difficulty when running ExMerge in batch mode. Here I am assuming ExMerge was installed successfully and that you are able to run the application through the Wizard. If you are having problems getting ExMerge to work, check Meeting the ExMerge Requirements. This takes you through the steps involved in getting ExMerge up and running.

Amongst other settings, ExMerge requires the list of mailboxes to be processed. These must be identified through their distinguished name (DN) and listed in a dedicated file typically named mailboxes.txt. The full path to this file must then be set within the configuration INI value 'FileContainingListOfMailboxes'.

The ExMerge documentation explains how to format this file exhaustively. What is usually a bit trickier is getting the distinguished names themselves. If you ran the ExMerge wizard and clicked on Save Settings, the list of mailboxes selected might be already waiting for you in mailboxes.txt under the directory where exmerge.exe is located. However, if at the wizard you selected all mailboxes, this file won't be created. Processing all mailboxes is the default behaviour and thus a list is not necessary. To generate the file, make sure to at least leave one mailbox unselected.

ExMerge Mailbox Selection

Use Save Settings now and look for mailboxes.txt.

Mailbox Distinguished Names

Looking at a few distinguished names helps understanding their format. Often, identifying a new mailbox simply requires replacing the alias at the end of the DN.

Copyright © 2005 - 2024 All rights reserved. ExchangeInbox.com is not affiliated with Microsoft Corporation