Configuring and running ADAMSync for the first time

So now that our ADAM schema is ready, we can go ahead and start configuring ADAMSync.

We need to do three things to get ADAMSync running at this point:
1) Modify the XML file. The XML file is used as the configuration point for ADAMSync, so we’ll tweak this file to have the settings we desire.
2) Install the XML file in to ADAM.
3) Run ADAMSync to perform the synchronization itself.

Step 1: Modifying the XML file
Let’s try and keep it simple to start. The easiest way to get off of the ground is just to pick the proper target, do the fewest modifications required and then run with it.

ADAMSync ships with a sample XML file which has many of the commonly used tags. I typically work from this as my starting point.
I started off by making a quick copy of the default ADAMSync config to use.

C:\WINDOWS\ADAM>copy MS-AdamSyncConf.XML ADAMSyncDemo.XML
        1 file(s) copied.

Now with that in hand, we can start making some changes for our first run of the tool.

To get things started, I’d suggest we first make the absolute bare minimum in terms of # of changes. We can explore different parts of the configuration file as we move forward, but it helps to first have a working configuration to work from.
Here’s what my config file looks like (with section I modified from the default in red):

<?xml version="1.0"?>
<doc> 
 <configuration>  
  <description>sample Adamsync configuration file</description>  
  <security-mode>object</security-mode>        
  <source-ad-name>erictest.local</source-ad-name>  
  <source-ad-partition>dc=erictest,dc=local</source-ad-partition>
  <source-ad-account></source-ad-account>               
  <account-domain></account-domain>
  <target-dn>dc=SyncTargetDC</target-dn>  
  <query>   
   <base-dn>dc=erictest,dc=local</base-dn>
   <object-filter>(objectClass=*)</object-filter>   
   <attributes>    
    <include></include>    
    <exclude>extensionName</exclude>
    <exclude>displayNamePrintable</exclude>    
    <exclude>flags</exclude>    
    <exclude>isPrivelegeHolder</exclude>    
    <exclude>msCom-UserLink</exclude>    
    <exclude>msCom-PartitionSetLink</exclude>    
    <exclude>reports</exclude>   
    <exclude>serviceprincipalname</exclude>
    <exclude>accountExpires</exclude>
    <exclude>adminCount</exclude>
    <exclude>primarygroupid</exclude>
    <exclude>userAccountControl</exclude>
    <exclude>codePage</exclude>
    <exclude>countryCode</exclude>
    <exclude>logonhours</exclude>
    <exclude>lockoutTime</exclude>
   </attributes>  
  </query>  
  <schedule>   
   <aging>    
    <frequency>0</frequency>    
    <num-objects>0</num-objects>   
   </aging>   
   <schtasks-cmd></schtasks-cmd>  
  </schedule> 
 </configuration> 
 <synchronizer-state>  
  <dirsync-cookie></dirsync-cookie>  
  <status></status>  
  <authoritative-adam-instance></authoritative-adam-instance>  
  <configuration-file-guid></configuration-file-guid>  
  <last-sync-attempt-time></last-sync-attempt-time>  
  <last-sync-success-time></last-sync-success-time>  
  <last-sync-error-time></last-sync-error-time>  
  <last-sync-error-string></last-sync-error-string>  
  <consecutive-sync-failures></consecutive-sync-failures>  
  <user-credentials></user-credentials>  
  <runs-since-last-object-update></runs-since-last-object-update>  
  <runs-since-last-full-sync></runs-since-last-full-sync> 
 </synchronizer-state>
</doc>

Step 2: Installing the XML file
With our XML file in hand, installing it in to the ADAM environment is a piece of cake.
It’s worth noting that the configuration itself is stored in the target environment (ADAM), not in the source. So we’ll focus the install command against our ADAM environment.

C:\WINDOWS\ADAM>adamsync /install localhost:50000 ADAMSyncDemo.XML
Done.

After installing it, I usually ask ADAMSync to list all of the configuration files once so that I can confirm it made it there.

C:\WINDOWS\ADAM>adamsync /list localhost:50000
Listing configuration files:
---------------------------
|-> "OU=SyncTarget": sample Adamsync configuration file
Done.

Looks good!

Step 3: Running ADAMSync for the first time
Our first run….let’s see what happens!

C:\WINDOWS\ADAM>adamsync /sync localhost:50000 dc=synctargetdc

C:\WINDOWS\ADAM>

ADAMSync just returned without error. This is the real measure of success. :) If there was a problem, we would have received some verbiage.
At this point we should be able to look at the target NC and the data should be there.
Did you get an error? If so, hang tight, tomorrow we’ll take a look at some of the logging available and look at one such log.