Get-DFSRBacklog PowerShell Script Available
Published Apr 04 2019 04:37 PM 2,265 Views
First published on TechNet on Oct 12, 2010

Hi folks. Our buddy Steve Grinker has posted an excellent sample PowerShell script for retrieving DFSR backlogs over the MS Code Gallery site:


It uses WMI to retrieve DFSR Replication Groups, Replicated Folders, Connections, and servers, then calculates all of their backlog information. All with a simple command-line and no need to shell DFSRDIAG or WMIC . It’s quite slick.

When you run it with no arguments it returns a human readable output of backlog status on the server you ran the script on, along with all of its partners:


But it also supports more sophisticated options like specifying remote servers, a count of files you consider to be “high backlog” for your specific environment, and some nice output options you get for free thanks to PowerShell pipelines:

get-dfsrbacklog.ps1 <server> <backlog count error threshold> | sort-object backlogstatus | format-table –groupby backlogstatus

Make sure you set bypass execution policies, as the script is unsigned obviously.

This is a great example of why PowerShell often kicks vbscript’s tail. Look at all the code that was required in this vbscript sample , where it is still less flexible than Psh.

Naturally, this script is not supported by Microsoft and we’re just pointing to someone else’s code. If Mr. Grinker wants to chat with you he will. Now maybe someone can convince him to write a PowerShell alternative to restoredfsr.vbs.

Great work Steve!

- Ned “community cheerleader” Pyle

Version history
Last update:
‎Apr 04 2019 04:37 PM
Updated by: