Solution:
Root Cause: Blocked RPC Endpoint Mapper (Port 135) or Dynamic High Ports (49152-65535)
Active Directory replication relies on the Remote Procedure Call (RPC) Endpoint Mapper listening on TCP Port 135 to negotiate dynamic high ports (TCP 49152–65535 in Windows Server 2008 R2 and later). If an internal firewall, IPsec policy, or third-party endpoint security suite blocks Port 135 or the dynamic RPC range,
repadmin /showrepl throws Error 1722.
# Step-by-Step Fix:
Verify RPC Network Connectivity via PowerShell:Run the following network diagnostic commands from the source DC to the target DC: powershell
Test-NetConnection -ComputerName DC02.domain.com -Port 135
Test access to the dynamic RPC range using PortQry or PowerShell: powershell
Test-NetConnection -ComputerName DC02.domain.com -Port 49152
Configure Windows Defender Firewall Rules:On both Domain Controllers, ensure the built-in inbound firewall rules are enabled:Active Directory Domain Controller - RPC (TCP-In)Active Directory Domain Controller - RPC Endpoint Mapper (TCP-In)Run this PowerShell command to enable mandatory AD replication rules: powershell
Enable-NetFirewallRule -DisplayGroup "Active Directory Domain Controller"
Restart RPC and Active Directory Domain Services (NTDS):Verify that the RpcSs (Remote Procedure Call) and NTDS services are running.Execute command to force KCC (Knowledge Consistency Checker) topology recalculation: cmd
repadmin /kcc
Force Immediate Partition Sync: cmd
repadmin /syncall /A /e /P