The repadmin command is a command-line tool used in Windows Server environments to manage and troubleshoot Active Directory (AD) replication. It allows administrators to monitor, diagnose, and resolve replication issues between domain controllers in an Active Directory forest.
Common repadmin Command Examples:
- Check the Replication
Summary: This
command provides an overview of the replication status between all domain
controllers in the Active Directory forest, showing success or failure of
replication, the last replication times, and other important details.
repadmin /replsummary
Example Output:
Replication Summary for forest
"example.com"
Domain Controllers in the forest
--------------------------------------------------------------
DC1
Last replication success: 2 hours ago
DC2
Last replication success: 1 hour ago
DC3
Last replication failed: 5 hours ago
- Show Replication Partners for
a Domain Controller: This
command shows the replication partners for a specific domain controller.
repadmin /showrepl DC1
Example Output:
DC1 has following replication partners:
DC2 Last
replication success: 5 hours ago
DC3 Last
replication failed: 10 hours ago
- Force Replication Between
Domain Controllers: This
command forces replication between all replication partners of a specified
domain controller.
repadmin /syncall DC1 /force
Example Output:
Synchronizing replication on DC1...
Starting synchronization of domain controllers in
the forest.
DC2
Successfully synchronized.
DC3
Replication error occurred.
- Check Replication Queue for a
Domain Controller: This
command shows the replication queue for a specific domain controller,
which helps you identify replication issues or delays.
repadmin
/queue DC1
Example Output:
Replication queue for DC1:
DC2 Pending
sync: 10 items
DC3 Pending
sync: 3 items
- Show Domain Controller
Metadata: This
command displays detailed information about the domain controller,
including its replication metadata, to help diagnose replication issues.
repadmin /showobjmeta DC1 "CN=User1,OU=Users,DC=example,DC=com"
Example Output:
DC1 metadata for CN=User1:
Version: 1
Last modified: 2023-12-25
Last replication success: 2 hours ago
- Generate Replication Log: This command generates a log
of all replication activities for a specific domain controller, which is
useful for identifying and troubleshooting replication issues.
repadmin
/logreplication DC1
Example Output:
Replication log for DC1:
DC2
Replication started: 10:30 AM, Replication success.
DC3
Replication failed: 11:00 AM, Error: Timeout.
- Show Naming Contexts for a
Domain Controller: This
command lists the naming contexts (partitions) hosted by a domain
controller, such as the schema, domain, and configuration partitions.
repadmin /shownamingcontexts DC1
Example Output:
Naming contexts for DC1:
- Domain
partition: DC=example,DC=com
- Configuration partition: CN=Configuration,DC=example,DC=com
- Schema partition: CN=Schema,DC=example,DC=com
- Display All Domain
Controllers in the Forest: This command lists all the domain controllers in
the entire forest, helping to verify if replication is occurring across
all of them.
repadmin /showdc
Example Output:
Domain controllers in the forest:
DC1 - Site: Default-First-Site-Name
DC2 - Site: Default-First-Site-Name
DC3 - Site: Default-First-Site-Name
Summary:
The repadmin command is
essential for diagnosing, monitoring, and troubleshooting replication issues in
Active Directory environments. It allows administrators to check replication
status, force replication, review error logs, and view detailed information
about domain controllers and their replication topology.
0 Comments