Running this script in the PowerShell ISE will give you a nice output comparing the server you’re running it on with the other connection members in the replication group(s) it belongs to.

You will see “warnings” highlighted in yellow and “errors” highlighted in red.

  • Since this was ran in a production environment I had to blur out the server names and replication group names.



It uses WMI to query the DFS Replication Groups and further gather the backlog statistics.


Copy the code below into PowerShell ISE and run it!


I have modified the script for my environment to send the results via e-mail, but I’d like to polish that up a little more if I am going to share it.


I hope this helps you!


Update 2/6/2018:

I updated the script with ability to email the results.

At line 31 it starts a transcript of the PS session and saves it at C:\scripts\dfsr1.txt

Lines 100 and beyond are where the output file is processed for email and actually sent.

  • I was sending through an open mail relay that does not need authentication.
  • If you need authentication for the SMTP server,  you will have to modify the Send-MailMessage line




Nick · February 7, 2018 at 8:32 am

Hi Tyler, this is great, thanks!
Did you ever get the emailing of results part working?

    Tyler Woods · February 7, 2018 at 8:49 am

    Yes I did! I am going to update the post since posting the script in the comments doesn’t exactly work well. Thanks!

    Tyler Woods · February 7, 2018 at 8:58 am

    Nick, the post has been updated with the method I used for emailing the results.

Leave a Reply