You can use the Dfsradmin command-line tool to script execution of health report creation for the Distributed File System Replication (DFSR) component.

Edit the dfsradmin command to match the parameters of your environment. The command syntax is:

dfsradmin health new /rgname:RG1 /refmemname:Domain_name\Server_Name /domain:domain_name.com /ReportName:<Path>\%RG1Report%

Include additional dfsradmin commands for each replication group you want to report on.

Save the text below as a .BAT file using Notepad. You can then schedule it to run as needed using Task Scheduler or the AT command.

set hh=%time:~0,2%
if "%time:~0,1%"==" " set hh=0%hh:~1,1%
set yymmdd_hhmmss=%date:~12,2%%date:~4,2%%date:~7,2%_%hh%%time:~3,2%%time:~6,2%
Set RG1Report=Report_%yymmdd_hhmmss%
dfsradmin health new /rgname:Replicationgroup1 /refmemname:Contoso.com\SRV01 /domain:contoso.com /ReportName:C:\DFSRReports\%RG1Report%

Other Languages


This article is also available the following languages: