All system engineers have experienced replication problems once in a lifetime. Today I will show you some basic commands to Troubleshoot and Diagnose Domain Controllers and replications. I'm talking about DCDiag and Repadmin.
DCDiag:
This command-line tool analyzes the status of one or all domain controllers in a forest and reports all problems to provide assistance in troubleshooting. DCDiag.exe consists of a variety of tests that can run either individually or as part of a set to check the state of the domain controller. Here are some examples:
- Preparing to install or migrate to Exchange;
- Checking FSMO roles;
- Troubleshooting Group Policies;
- Investigating Active Directory not replicating frssysvol error;
- Running down Kerberos authentication problems;
- Resetting the Directory Service Administrator's password;
- Fixing a servers Service Principle Name (SPN) error.
Repadmin
Performs replication-related tasks, such as managing and modifying replication topology, forcing replication events, and viewing replication metadata and updated vectors.
Let's see some examples and a Script to automize all Domain Controllers replication.
Some of my favorites:
dcdiag /test:replications (Report about replications state between DCs)
dcdiag /test:DNS (Report about DNS state)
dcdiag /test:DNS /e /v (Verbose Report about all DNS Servers)
/v - Verbose;More information in:
/e - Test all servers;
/q - Only error messages;
/s - Specify the Domain Controller;
/fix - Fixes Service Principal Names (SPN) problems;
/f:logfile.txt - Output to a file.
https://technet.microsoft.com/en-us/library/cc757689%28v=ws.10%29.aspx?f=255&MSPPError=-2147217396
Some of my favorites:
repadmin /showreps (show all replication between Domain Controllers)
repadmin /replsummary (replication statistics)
repadmin /showism (replication information between sites)
repadmin /replsummary > result.txt (Output to a file)
repadmin /syncall /AeD (force Active Directory replication)
repadmin /syncall /APeD (Sync all patitions in the Enterprise)
/A - All partitions;More information in:
/e - Enterprise, Cross Site;
/D - Identify servers by distinguished name in messages;
/P - Push replication;
https://technet.microsoft.com/en-us/library/cc770963%28v=ws.11%29.aspx?f=255&MSPPError=-2147217396
Here is a simple Script that sync all the Domain Controllers:
Import-Module ActiveDirectory
$DCs = (Get-ADForest).Domains | %{ Get-ADDomainController -Filter * -Server $_ } | select HostNameforeach ($DC in $DCs){repadmin /syncall $DC.HostName}
No comments:
Post a Comment