Active Directory Replication State Management Technology Sample
This sample demonstrates how to manage Active Directory replication. This sample is available only in Visual C#.
Note |
---|
This sample contains fictitious values and cannot be run until modified with settings for an existing domain. |
For information about using the samples, see the following topics:
To customize the sample for your settings
Modify the following string variables with real values in the Program.cs file:
targetDomainName. The fully qualified name of the domain containing the servers involved in the replication.
targetServer. The fully qualified name of the server to use as a replication target, for example, "srv1.fabrikam.com".
sourceServer. The fully qualified name of the server to use as a replication source, for example, "srv2.fabrikam.com".
partitionName. The name of the partition to replicate, for example, "CN=Configuration,DC=fabrikam,DC=com".
To perform these operations under a user account other than the one which is running the application, you will need to replace several method calls with calls that specify the desired user and password. Replacement code is included in the sample in comments. To activate it, remove the comment characters from the replacement code and comment out the method call using default credentials that appears above it. Update the "alt-username" string to reflect the user under which the application runs, and the "alt-password" string to reflect that user's password.
To build the sample
Open a Command Prompt window and navigate to the ReplicationStateManagement\CS directory. For information about required settings and the SDK Command Prompt, see How to: Set Sample Settings.
Type msbuild replicationstatemanagement.sln at the command line.
To run the sample
Navigate to the directory that contains the built executable, using the command prompt.
Type replicationstatemanagement and press Enter.
Note |
---|
This sample is a console application. You must start and run it in a Command Prompt window to view its output. |
Remarks
This sample performs the following replication tasks:
Checks replication consistency.
Synchronizes replication from a source server.
Synchronizes replication from all neighborhoods.
Synchronizes replication from all servers.
Creates new replication connections.
Creates a customized replication schedule.