The domain controller (DC) and replication management functions provide tools for finding data about DCs, converting the names of network objects between different formats, manipulating service principal names (SPNs) and directory service agents (DSAs), and managing replication of servers. The following functions enable developers to work with domain controllers, replication, and the directory service:
Most of these functions require a handle bound to the directory service. The DsBind and DsBindWithCred functions start an RPC session with a particular domain controller, then they bind a handle to the directory service and return the handle. When the handle is no longer required, use the DsUnBind function to end the RPC session and unbind the handle.
Replication occurs between a source server and a destination server. A source server maintains a list of destination servers to which it should replicate, and a destination server maintains a list of source servers from which it receives replication. Use the DsReplicaAdd function to add to the list of source servers on a destination server, and use the DsReplicaDel function to remove references from the source server list on a destination server. The DsReplicaModify function may be used to change an existing source server reference on a destination server. To change the list of destination servers on a source server, use the DsReplicaUpdateRefs function.
Actual replication is performed by the DsReplicaSync and DsReplicaSyncAll functions. The DsReplicaSync function synchronizes a specific destination server with a single source server. Use the DsReplicaSyncAll function to synchronize a destination server with all other servers in the site.