The information used by DIRSYNC to execute its commands comes from one or both of the following sources:
Because DIRSYNC stores its configuration information in the registry, an instance name is generally used to give access to all the parameters in that instance. This instance name points to a location in the registry where the DIRSYNC configuration information is stored. If you specify an instance by its name only, DIRSYNC will look for its data in the following registry key:
HKEY-LOCAL-MACHINE\SOFTWARE\MS EXCHANGE SAMPLES\DIRSYNC\<instance-name>
The instance name is not necessary if all required information is supplied on the command line, or if the /KEY command-line flag is used to point to a registry key where instance data is stored.
You can use the the Windows NT Registry to create and view instances, or you can run DIRSYNC with the /SET command-line flag. If you use the /SET flag, parameters entered from the command line are copied into the registry, but the requested operation is not performed. Without the /SET flag, DIRSYNC creates a transient instance that uses command-line flags, but does not update the registry.
If you have not used the /SET flag, have not included all the information on the command line, and type an instance name that does not exist in the registry, DIRSYNC prompts you to create a new instance. If you answer Y, DIRSYNC writes to the registry key, but performs no operation — as if you had used the /SET flag. Answering N to this question exits the program.
\BKOFFICE\SAMPLES\EXCHANGE\DIRSYNC
The following procedure shows how to set up a new instance of DIRSYNC without using the /SET command-line flag and with /SET.
DirSync <instance name>
If you type the following command and use an unknown instance name, DIRSYNC displays this message:
The instance <Instance-Name> is unknown. Create a new instance? (Y/N)
If you type N, DIRSYNC terminates immediately. If you type Y, DIRSYNC creates the new registry keys and all the default values, exits, and displays the following message:
New NT Registry key created for instance HR-Database:
HKEY_LOCAL_MACHINE\SOFTWARE\EDK Samples\DIRSYNC\<Instance-Name>
DIRSYNC <instance name> /SET /EXPORT /SITEDN=/O=ORGANIZATION/OU=SITE
/CONTAINER=Recipients /DSA=server1 /EXPLIST=
Obj-Class,Common-Name,Display-Name,
USN-Changed/EXPFILE=C:\EXPORT.OUT