Create a Domain replication report via script

0
Create a Domain replication report via script

I use this frequently to ensure that my domains are in good replication health. Copy/paste the script below and save it to a *.cmd file on your DC then just right click and Run as Administrator to output the TXT file report.

@echo off
echo.
echo Gathering Report for DCLIST = %1
echo.
Echo Report for DCLIST = %1 > replreport.txt
echo. >> %~dp0\replreport.txt
echo. >> %~dp0\replreport.txt
echo Gathering Verbose Replication and Connections
echo Verbose Replication and Connections >> %~dp0\replreport.txt echo. >> %~dp0\replreport.txt
repadmin /showrepl %1 /all >> %~dp0\replreport.txt
echo. >> %~dp0\replreport.txt
echo Gathering Bridgeheads
echo Bridgeheads >> %~dp0\replreport.txt
echo. >> %~dp0\replreport.txt
repadmin /bridgeheads %1 /verbose >> %~dp0\replreport.txt
echo. >> %~dp0\replreport.txt
echo Gathering ISTG
echo ISTG >> %~dp0\replreport.txt
echo. >> %~dp0\replreport.txt
repadmin /istg %1 >> %~dp0\replreport.txt
echo. >> %~dp0\replreport.txt
echo Gathering DRS Calls
echo Outbound DRS Calls >> %~dp0\replreport.txt
echo. >> %~dp0\replreport.txt
repadmin /showoutcalls %1 >> %~dp0\replreport.txt
echo. >> %~dp0\replreport.txt
echo Gathering Queue
echo Queue >> %~dp0\replreport.txt
echo. >> %~dp0\replreport.txt
repadmin /queue %1 >> %~dp0\replreport.txt
echo. >> %~dp0\replreport.txt
echo Gathering KCC Failures
echo KCC Failures >> %~dp0\replreport.txt
echo. >> %~dp0\replreport.txt
repadmin /failcache %1 >> %~dp0\replreport.txt
echo. >> %~dp0\replreport.txt
echo Gathering Trusts
echo Trusts >> %~dp0\replreport.txt
echo. >> %~dp0\replreport.txt
repadmin /showtrust %1 >> %~dp0\replreport.txt
echo. >> %~dp0\replreport.txt
echo Gathering Replication Flags
echo Replication Flags >> %~dp0\replreport.txt
echo. >> %~dp0\replreport.txt
repadmin /bind %1 >> %~dp0\replreport.txt
echo. >> %~dp0\replreport.txt
echo Done.

Found priceless insights in this blog? Support the author’s creativity – buy them a coffee!

Leave a Reply

Your email address will not be published. Required fields are marked *