What is the syntax and usage for EMCLI DIRSYNC? (NETIQKB863)

  • 7700863
  • 02-Feb-2007
  • 07-Jun-2007

Resolution

goal
What is the syntax and usage for EMCLI DIRSYNC?

goal
What utility do I use to synchronize the directories in the source and target Exchange sites?

goal
How do I run a batch file at a scheduled time?

fact
Exchange Migrator 1.x

fact
Exchange Migrator 2.x

fix

DIRSYNC synchronizes directories in the source and target Exchange sites. This operation copies the Global Address List, selected mailbox properties, and Distribution List membership to the target site so that both Exchange sites contain the same information after synchronization.  Once you start directory synchronization, it cannot be aborted.  Exchange Migrator will continue the synchronization until complete. Also, this operation cannot be combined with the /TIME option.

Syntax for DIRSYNC

Run the Exchange Migrator command-line interface from the folder where you installed Exchange Migrator.  If a project name or file name contains spaces, enclose the name in quotation marks ("project name with spaces").

This syntax will not work on versions previous to EM 2.0.

EMCLI DIRSYNC /PROJECT projectname [/DIRECTION direction] [/SOURCECONTAINER "container"] [/TARGETCONTAINER "container"] [/MERGEMETHOD mergetype] [/VERBOSE] [/VERYVERBOSE] [/DELETE] [/CLEARTABLES]

Options

/PROJECT projectname

Specifies the name of the Exchange Migrator project. If the project name contains spaces, enclose the name in quotes.

[/DIRECTION direction]

Specifies the direction of the directory synchronization. Use this command in combination with the dirsync option. You can copy information one way or two ways between the source and target Exchange servers. Copy information one way from the source to the target Exchange server by entering the option sourcetotarget. Copy information one way from the target to the source Exchange server by entering the option targettosource. Copy information two ways between both the source and target Exchange servers by entering the option twoway.

[/SOURCECONTAINER "container"]

Specifies the container on the source Exchange server where you want to create objects. Use this command in combination with the dirsync option. Enter the distinguished name for the specified container. A distinguished name in Exchange 5.5 uses the following format: CN=container,OU=site,O=organization. A distinguished name in Exchange 2000 for user-created containers uses the following format: OU=organizationalunit,DC=mydomain,DC=com. If you do not specify a container, new objects are created in the default container. The default container on Exchange 5.5 is Recipients. The default container on Exchange 2000 is Users. Windows does not allow Custom Recipients in the built-in container. Do not specify the built-in container as your target container for directory synchronization.

[/TARGETCONTAINER "container"]

Specifies the container on the target Exchange server where you want to create objects. Use this command in combination with the dirsync option. Enter the distinguished name for the specified container. A distinguished name in Exchange 5.5 uses the following format: CN=container,OU=site,O=organization. A distinguished name in Exchange 2000 for user-created containers uses the following format: OU=organizationalunit,DC=mydomain,DC=com. If you do not specify a container, new objects are created in the default container. The default container on Exchange 5.5 is Recipients. The default container on Exchange 2000 is Users. Windows does not allow Custom Recipients in the built-in container. Do not specify the built-in container as your target container for directory synchronization.

[/MERGEMETHOD mergetype]

Specifies whether Exchange Migrator merges source and target accounts based on a common property when migrating to Exchange 2000 running on Windows 2000. If you choose to merge source and target accounts, this command also specifies the pr.
operty Exchange Migrator uses to merge the accounts. Use this command in combination with the dirsync option. To specify that you do not want to merge source and target accounts, specify None for the merge type. To merge accounts that share the same SID History, specify SIDHistory. To synchronize accounts based on SID History, your target Exchange 2000 organization must be running on a Windows 2000 native mode operating system. To merge accounts that share the same SAMAccountName property, specify SAMAccountName. If the specified property of the source object is not shared with a target object, Exchange Migrator creates a new custom recipient on the target for that source object. Exchange Migrator does not synchronize accounts when the corresponding target account is mail-enabled or mailbox-enabled.

[/VERBOSE]

Prints information about each object handled by the dirsync option. EMCLI provides the distinguished name for each object handled and the outcome of the attempted task. All information prints to the screen unless directed to a text file.

[/VERYVERBOSE]

Prints information about each object handled by the dirsync option as well as diagnostic logging information. Diagnostic information may be requested by technical support to help resolve problems. All information prints to the screen unless directed to a text file.

[/DELETE]

Compares directories on the source and target Exchange servers and to delete custom recipients that exist on one server without associated custom recipients on the other server. Use this command in combination with the dirsync option. This option only deletes custom recipients created by the dirsync option. This option may significantly decrease performance of EMCLI on the synchronization where this option is applied and cannot be undone. You may prefer to manually delete custom recipients.

[/CLEARTABLES]

Ignores information about objects created by the dirsync option that is stored in the Exchange Migrator database. Applying this option may cause the /delete option not to function correctly. This option may significantly decrease performance of EMCLI.

Example:

To perform a two-way directory synchronization on My Project and outputs the results to dailysync.txt:

EMCLI dirsync /project "my project" /direction twoway >dailysync.txt

Example:

You can combine the EMCLI commands in a batch file and run the batch file at a later time using the Windows Schedule service. In the following batch file, mymigration.bat, the EMCLI commands specify to synchronize the directories.

To run a batch file at a scheduled time:

rem Example Batch file mymigration.bat

EMCLI dirsync /project "my project" /direction twoway >dailysync.txt

You may schedule the batch file to run at specified times using the Windows schedule service.

.


note

To learn more about EMCLI Dirsync, please see NETIQKB1153:

  • https://www.netiq.com/kb/esupport/consumer/esupport.asp?id=NETIQKB1153


note

Dirsync does not synchronize Custom Recipients.  For more information, see the following knowledge base article:

Does the Exchange Migrator EMCLI Dirsync command migrate Customer Recipients? 



Additional Information

Formerly known as NETIQKB863

Feedback service temporarily unavailable. For content questions or problems, please contact Support.