Friday, 25 April 2014

Repadmin Requirements, Syntax, and Parameter Descriptions


You can use the repadmin command to perform replication tasks and to manage and modify the replication topology, force replication events, and display replication metadata and up-to-dateness vectors. This topic covers:

System requirements

The following are the system requirements for repadmin:
  • Windows XP Professional, Windows Vista®, Windows Server 2003, or Windows Server 2008
  • Administrator rights on the domain controller:

    • Required replication rights can be delegated
    • Some commands do not require Administrator rights

File requirements

Repadmin.exe is included in the Windows Server 2003 Service Pack 1 (SP1) Support tools. You must install the Support tools before you can use them. For more information about how to install the Support tools, see Windows Server 2003 SP1 Support Tools in the Microsoft Knowledge Base (http://go.microsoft.com/fwlink/?LinkID=44321).
To obtain the Support tools if you do not have the Windows Server 2003 operating system disc, see Windows Server 2003 SP1 32-bit Support Tools on the Microsoft Download Center (http://go.microsoft.com/fwlink/?LinkID=70775).
Previous versions of repadmin have similar functionality, but they have some limitations regarding the workstations that they can be run on and which functions they can perform. The following table lists the versions of repadmin, which operating systems they can be run on, and which domain controllers they can target.

 

Version
Client operating system
Target operating system
Important feature sets
Windows 2000
Windows 2000 and later
All Active Directory versions
/sync
/propcheck
/showreps
/showvector
/showmeta
Windows Server 2003
Windows XP Professional and Windows Server 2003
All Active Directory versions
/notifyopt
/replsummary
/replicate
/replsingleobj
/removelingeringobjects
/rehost and /unhost
/showmsg
/showattr
/syncall
/viewlist
DC_LIST
Windows Server 2003 with SP 1
Windows XP Professional and Windows Server 2003
All Active Directory versions
Rehost requires Windows 2000 Server SP4 and later
Remove lingering objects requires Windows Server 2003
/showbackup
/rehost bug fix
/regkey
Active Directory Application Mode (ADAM)
Windows XP Professional and Windows Server 2003
All Active Directory versions
/setattr
/listhelp

 

Deprecated subcommands (from Windows 2000 Server)
Equivalent or improved subcommands in Windows Server 2003
/sync
/propcheck
/showreps
/showvector
/showmeta
/repl or /replicate
/showchanges
/showrepl
/showutdvec
/showobjmeta

Repadmin command-line options

Repadmin is executed at the command prompt, and it contains several subcommands, which are described in detail in the following section.

Syntax

repadmin <subcommand> [<dsa>] [/u: <UserName>] [/pw: {<Password> | *}] [/rpc] [/ldap] [/homeserver: <dsaname>]

Parameters

 

Parameter
Description
<subcommand>
One of the repadmin subcommands that is described in the subcommands section.
<Dsa>
Directory System Agent (DSA) represents the domain controller to be targeted by the repadmin subcommand.
Not all repadmin subcommands require the dsa parameter
Type repadmin /listhelp at the command line for additional information about the dsa parameter.
/u:<UserName>
Specifies the account name to use for binding to the directory. By default, /u uses the account name with which the user is currently logged on. You can use any of the following formats to specify an account name:
  • account name (for example, Bob)
  • domain\account name (for example, contoso\Bob)
  • user principal name (UPN) (for example, Bob@contoso.com)
/pw {<Password> | *}
Specifies the password to use for authentication. If you type *, you are prompted for a password.
/rpc
Forces repadmin to communicate by using a remote procedure call (RPC) session.
/ldap
Forces repadmin to communicate by using a Lightweight Directory Access Protocol (LDAP) session. If LDAP communication fails, repadminattempts to communicate by using RPC. LDAP is the default communication method for repadmin.
/homeserver:<dsaname>
Forces repadmin to run against a specific domain controller, which is determined by the forest membership of the directory server that is represented by <dsaname>.
You can specify <dsaname> in the following formats:
<Computername><Dnsname><Dsaguid>, *, ., “site:<site>”, “fsmo_dnm:”, or “fsmo_schema:”.

Repadmin subcommands

 

Subcommand
Syntax and description
bind
repadmin /bind [dsa]
Connects to and displays the replication features for a directory server.
bridgeheads
repadmin /bridgeheads [dsa]
Lists the directory servers that act as bridgehead servers for a specified site.
checkprop
repadmin /checkprop [dsaNaming ContextOriginatingDCInvocationIDOriginatingUSN
Compares the properties of specified directory servers to determine if they are up to date with each other. The source directory server contains the original information that must be checked. The data on the destination directory server is compared to the data on the source directory server.
dsaguid
repadmin /dsaguid [dsa] [GUID]
Returns a server name when given a globally unique identifier (GUID).
failcache
repadmin /failcache [dsa]
Displays a list of failed replication links that are detected by the Knowledge Consistency Checker (KCC).
istg
repadmin /istg [dsa] [/verbose]
Returns the computer name of the Intersite Topology Generator (ISTG) server for a specified site.
kcc
repadmin /kcc [dsa] [/async]
Forces KCC to calculate replication topology for a specified directory server. By default, this calculation occurs every 15 minutes.
latency
repadmin /latency [dsa] [/verbose]
Displays the amount of time between replications, by using the ISTG Keep Alive time stamp. The ISTG Keep Alive time stamp is not used in forests that are set to the Windows Server 2003 forest functional level. Instead, in those environments, use repadmin /showutdvec /latency.
notifyopt
repadmin /notifyopt [dsaNaming Context [/first:Value] [/subs:Value]
Displays or sets the notification timing settings for replication of a specified directory partition.
queue
repadmin /queue [dsa]
Displays tasks that are waiting in the replication queue.
prp
Repadmin /prp [operationRODC [additional arguments]
Displays or modified the Password Replication Policy for a read-only domain controller (RODC).
This command is available only for versions of Repadmin that are included in Windows Server 2008, Windows Server 2008 R2, or Remote Server Administration Tools.
The operation can be viewadddelete, or move. For viewadd, and deleteRODC can be either RODC_Name or *. For moveRODC must beRODC_name.
querysites
repadmin /querysites FromSiteRDNToSite1RDN [ToSite2RDN...]
Uses routing information to determine the cost of a route from a specified site to another specified site or sites. The querysites parameter does not allow the use of alternate credentials. The relative distinguished names that are used in this command are case sensitive.
replicate
Syntax 1
repadmin /replicate destination_dsasource_dsa [/force] [/async] [/full] [/addref]
Syntax 2
repadmin /replicate destination_dsa [/force] [/async] [/full] [/addref] /allsources
Starts a replication event for the specified directory partition between the source and destination directory servers. You can determine the source GUID when you view the replication partners by using showrepl.
replsingleobj
repadmin /replsingleobject dsaDsaSourceGUIDObjectDN
Replicates a single object between any two directory servers that have partitions in common. The two directory servers do not have a replication agreement. You can show replication agreements by using the repadmin /showrepl command.
replsummary
repadmin /replsummary [dsa] [/bysrc] [/bydest] [/errorsonly][/sort:{delta|partners|failures|error|percent}]
Summarizes the replication state and relative health of an Active Directory forest.
rodcpwdrepl
repadmin /rodcpwdrepl [DSA_listHub DCUser1 DN [User2 DNUser3 DN]
Triggers replication of passwords for the specified users from the source Hub DC to one or more RODCs.
This command is available only for versions of Repadmin that are included in Windows Server 2008, Windows Server 2008 R2, or Remote Server Administration Tools.
showattr
repadmin /showattr dsa [OBJ_LIST] [OBJ_LIST_OPTIONS] [/attr|/attrs: attributeattribute ...] [/allvalues] [/long] [/nolongblob] [/nolongblob] [/nolongfriendly] [/dumpallblob]
The /showattr operation displays the attributes and contents of an object.
showcert
repadmin /showcert dsa
Displays the certificates (used with Simple Mail Transfer Protocol (SMTP)–based replication) that are loaded on a specified directory server.
showchanges
Syntax 1
repadmin /showchanges source_dsaNaming Context [/cookie: File] [/atts: attribute1,attribute2,...]
Syntax 2
repadmin /showchanges dest_dsaSourcedsaObjectGUIDNaming Context [/verbose] [/statistics] [/noincremental] [/objectsecurity] [/ancestors] [/atts:attribute1,attribute2,...] [/filter: ldap filter]
Displays changes from a specified directory partition or changes to a specified object. "Syntax 1" saves changes to a directory partition. If this information is saved to a file, you can run the getchanges operation again for comparison. "Syntax 2" lists changes to a specified object. For this command to run properly, the account under which the command is run must possess the replication get changes right on the specified directory partition.
showconn
repadmin /showconn [dsa] [ServerRDN | ContainerDN | dsa_GUID] [/From:ServerRDN] [/intersite]
Displays the connection objects for a specified directory server. The default is local site.
showctx
repadmin /showctx [dsa] [/nocache]
Displays a list of computers that have opened sessions with a specified directory server.
showism
repadmin /showism [TransportDN] [/verbose]
Queries the Intersite Messaging Service (ISM) for site routes. This operation cannot be executed remotely.
showmsg
repadmin /showmsg {Win32Error | DSEventID | NTDSMSG}
Displays the error message for a given error number.
showncsig
repadmin /showncsig [dsa]
Each directory server maintains a directory partition signature list. This command displays a list of the removed application partition GUIDs. You can configure an application directory partition to be held or not held on a particular directory server by using ntdsutil (for Active Directory).
showobjmeta
repadmin /showobjmeta [dsaObjectDN [/nocache] [/linked]
Displays the replication metadata for a specified object that is stored in the directory, including attribute ID, version number, originating and local update sequence number (USN), and originating server's GUID and Date and Time stamp. When you compare the replication metadata for the same object on different directory servers, you can determine whether replication has occurred.
showoutcalls
repadmin /showoutcalls [dsa]
Displays calls that have been made by the specified directory server to other directory servers but not yet answered.
showproxy
Syntax 1
repadmin /showproxy [dsa] [Naming Context] [matchstring]
Syntax 2
repadmin /showproxy [dsa] [ObjectDN] [matchstring] /movedobject
Lists cross-domain move proxy objects. When an object is moved from one domain to another, a marker remains in the original domain. This marker is called a proxy.
showrepl
repadmin /showrepl [dsa] [SourceDCObjectGUID] [Naming Context] [/verbose] [/nocache] [/repsto] [/conn] [/csv] [/all] [/errorsonly] [/intersite]
Displays replication information. Inbound replica links are displayed by default. Outbound links can also be shown, as well as connections corresponding to those links. The command also displays errors that correspond to replica links that cannot be created by KCC. This helps an administrator build a visual representation of the replication topology and see the role of each directory server in the replication process.
showcig
repadmin /showsig [dsa]
Displays the retired invocation IDs on a directory server. A directory server changes its invocation ID when it is restored or when it rehosts an application partition.
showtime
repadmin /showtime [DSTimeValue]
Converts a directory service time value to string format for both the local and the UTC time zones.
showtrust
repadmin /showtrust [dsa]
Lists all Active Directory domains that are trusted by a specified Active Directory domain.
showutdvec
repadmin /showutdvec dsaNaming Context [/nocache] [/latency]
Displays the highest USN for the specified directory server. This information shows how up to date a replica is with its replication partners.
showvalue
repadmin /showvalue [dsaObjectDN [AttributeName] [ValueDN] [/nocache]
Displays the values of the type, last modified time, originating directory server, and distinguished name of a specified object.
syncall
repadmin /syncall dsa [Naming Context] [Flags]
Synchronizes a specified directory server with all replication partners. This command contains several subcommands, which are described in the usage scenarios.
By default, if no directory partition is provided in the NamingContext parameter, the command performs its operations on the configuration directory partition.
viewlist
repadmin /viewlist [dsa] [OBJ_LIST]
Displays a list of directory servers.
oldhelp
Displays a list of the operations that have been deprecated in this version of repadmin.

Repadmin /listhelp

 

Arguments
Values
Description
DC_LIST
“*”
All domain controllers in the enterprise
DC_Name
See under DC_NAME argument
Part-server_name*
Would pick "part_server_name_dc_01" and "part_server_name_dc_02" but not server "part_server_diff_name".
Site:site_name
All domain controllers in the specified site.
Gc:
All global catalog servers in the enterprise.
Fsmo_fsmo_type:fsmo_dn
See under FSMO_TYPE
FSMO_TYPE
Types of operations master (also known as flexible single master operations or FSMO) role holders require different base distinguished names or relative distinguished names.
Fsmo_dnm:
Enterprise-wide FSMO; does not take any distinguished name (also known as DN).
Fsmo_schema:
Enterprise-wide FSMO; does not take any distinguished name.
Fsmo_pdc:
Domain-specific FSMO; takes the distinguished name of the domain that the user specifies.
Fsmo_rid:
Domain-specific FSMO; takes the distinguished name of the domain that the user specifies.
Fsmo_im:
Domain-specific FSMO; takes the distinguished name of the domain that the user specifies.
Fsmo_istg:
Site-specific quasi-FSMO; takes the relative distinguished name of the site.
DC_NAME
“.”
Tells repadmin to try to pick a domain controller for you.
Server_dns
Specifies a server by DNS.
Dc_dsa_guid
Specifies a specific server by its Directory System Agent (DSA) GUID.
Server_obj_rdn
Specifies a server by its server object relative distinguished name (usually the same as its NetBios name).
Dsa_dn
Specifies a server by the distinguished name of its DSA object.
OBJ_LIST
Ncobj:NC_NAME
Specifies the use of the distinguished name of NC Head that is specified in NC_NAME.
Dsaobj:
Specifies the use of the distinguished name of the DSA that repadmin is connected to.
NC_NAME
Config:
Configuration directory partition.
Schema:
Schema directory partition.
Domain:
Domain directory partition for the domain of the domain controller that repadmin is running against.
OBJ_LIST OPTIONS
{/onelevel | /subtree} /filter:{ldap_filter}
With these options, you can use the showattr and viewlist commands to cover a list of objects, instead of just a single object.

CSV format

The output that repadmin /showrepl returns can be difficult to navigate when you are troubleshooting replication errors or viewing replication topology in a large enterprise. There is a new feature (/CSV) that you can use to force /showrepl output to print in a tightly constrained comma-separated-value (CSV) format for programmatic manipulation or quick import and correlation in Excel.
The CSV format is also an effective way to exchange repadmin outputs because it is not prone to user errors.
To generate output as a .csv (comma-delimited) file, perform the following steps:
  1. Open a command prompt, type the following command, and then press ENTER:

    repadmin /showrepl <DC_NAME> /csv > Repl.csv
  2. Open Repl.csv, and then delete or hide column A and both RPC and SMTP columns.
  3. Select row 2. Click View, and then click Freeze Panes.
  4. Highlight the column heading row. Click Data, point to Filter, and then click AutoFilter.
  5. Click the drop-down arrow to display replication status based on your situation.
CSV formatted output

Repadmin Introduction and Technology Overview


Repadmin.exe is a command line tool that is designed to assist administrators in diagnosing, monitoring, and troubleshooting Active Directory replication problems.

Active Directory replication dependencies

Active Directory replication has the following dependencies:
  • Routable IP infrastructure. The replication topology depends on a routable IP infrastructure from which you can map IP subnet address ranges to site objects. This mapping generates the information that client workstations use to communicate with domain controllers that are close by—when there is a choice—rather than with domain controllers that are located across wide area network (WAN) links.
  • DNS. The Domain Name System (DNS) that resolves DNS names to IP addresses. Active Directory requires that DNS is properly designed and deployed so that domain controllers can correctly resolve the DNS names of replication partners.
  • Remote procedure call (RPC). Active Directory replication requires IP connectivity and the remote procedure call (RPC) to transfer updates between replication partners.
  • Kerberos version 5 (V5) authentication. The authentication protocol for both authentication and encryption that is required for all Active Directory RPC replication.
  • Lightweight Directory Services Protocol (LDAP). The primary access protocol for Active Directory. Replication of an entire replica of an Active Directory domain, as occurs when Active Directory is installed on an additional domain controller in an existing domain, uses LDAP communication rather than RPC.
  • NetLogon. NetLogon dynamically registers the globally unique identifier (GUID) CNAME in DNS that a domain controller uses to resolve its partner’s host name and IP address for Active Directory replication.
  • Intersite Messaging. Intersite Messaging is required for Simple Mail Transfer Protocol (SMTP) intersite replication and for site coverage calculations. If the forest functional level is Windows 2000, Intersite Messaging is also required for intersite topology generation.
Replication Topology and Dependent Technologies

Glossary of replication terms

The following table lists terms that are commonly used in discussions about Active Directory replication.

 

Term
Definition
Active Directory replication
Active Directory is a distributed directory service, in which not all objects in the directory are stored on every domain controller. In addition, all domain controllers in a domain can be updated directly, not just one primary domain controller. Active Directory replication is the means by which changes that are made on one domain controller are synchronized with all other appropriate domain controllers in the domain or forest that store copies of the same information. Data integrity is maintained by tracking changes on each domain controller and updating other domain controllers in a systematic way. Replication uses a connection topology that is created automatically to make optimal use of beneficial network connections.
Active Directory replication topology
Replication topology is the current set of Active Directory connections by which domain controllers in a forest communicate over local area networks (LANs) and WANs to synchronize the directory partition replicas that the domain controllers have in common. Replication topology generation is usually dynamic. It adapts to the network conditions and availability of domain controllers. As a result of how much we rely and depend on directory services today, it is very important to ensure that a directory replication topology is fine-tuned to maintain and deliver the expected level of performance.
Active Directory sites
A site is a part of the network with high bandwidth connectivity. By definition, it is a collection of well-connected computers, based on IP subnets. You can use the Active Directory Sites and Services snap-in to administer sites. Because sites control how replication occurs, changes that you make with this snap-in affect how efficiently domain controllers within a domain (but separated by great distances) will coalesce.
Knowledge Consistency Checker (KCC)
A part of the ISTG role in Active directory. The KCC checks and, as an option, re-creates topology information for the Active Directory domain.
Intersite Topology Generator (ISTG)
This is a role that one domain controller in an Active Directory site must perform.The ISTG designates one or more bridgehead servers to perform replication between sites.
Multimaster replication
Every domain controller can receive originating updates to data for which it is authoritative, rather than having a single domain controller that receives all original updates (also known as single-master replication, such as Microsoft Windows NT® 4.0 replication).
Pull replication
Domain controllers request (pull) changes rather than send (push) changes that might not be necessary.
Store-and-forward replication
Each domain controller communicates with a subset of domain controllers to transfer replication changes, rather than one domain controller being responsible for communicating with every other domain controller that requires the change.
High water mark
High water mark is a value that the destination domain controller maintains to keep track of the most recent changes that it has received from a specific source domain controller for an object in a specific partition. High water mark prevents irrelevant objects from being considered by the source domain controller with respect to a single destination.
Up-to-dateness vector
The up-to-dateness vector is a value that the destination domain controller maintains for tracking the originating updates that are received from all source domain controllers. When a destination domain controller requests changes for a directory partition, it provides its up-to-dateness vector to the source domain controller. The source domain controller then uses this value to reduce the set of attributes that it sends to the destination domain controller.

Glossary of other replication-related terms

The following table lists terms that are related to other technologies that depend on Active Directory replication topology.

 

Term
Definition
File Replication Service (FRS)
The replication service in Windows 2000 Server and Windows Server 2003 that is used to replicate the SYSVOL shared folder.
Replica set
The collection of servers that are all replicating a given set of directories is called a replica set. With an appropriate topology design and sufficient network support, a Windows 2000 or Windows Server 2003 FRS replica set can span thousands of computers. It is also possible for a single computer to be a member of multiple replica sets.
Topology
Topology defines the set of connections that are used to send updates between members of a replica set. The topology definition includes both the connections and the properties of those connections, such as the schedule, enabled and disabled flags, and so on.
Disconnected operation
FRS can operate even if some or all member computers are disconnected from each other for periods of time. Changes can be accepted by any computer, and changes are replicated to other member computers when connectivity is reestablished.
Authenticated RPC with encryption
To provide secure communications, FRS uses the Kerberos authentication protocol for authenticated RPC to encrypt and tamper-proof the data that is sent between replication partners.