Quickpost – Use Powershell to get DFS-R initial replication status

Hi all,

because I didn’t found this in the first sight, and had to use a wmic query, I have prepared my Powershell command:
Get-WmiObject -Namespace root\microsoftdfs -Class dfsrreplicatedfolderinfo | Select-Object ReplicatedFolderName,State

The State 2 indicates, that the replication is not done yet, but a 4 would indicate that the initial replication is done.

See this website for the class explanation:
https://msdn.microsoft.com/en-us/library/bb540019(v=vs.85).aspx

Possible states are:
Uninitialized (0)
Initialized (1)
Initial Sync (2)
Auto Recovery (3)
Normal (4)
In Error (5)

If you only want to get all replications with a specific status, use the following command:
Get-WmiObject -Namespace root\microsoftdfs -Class dfsrreplicatedfolderinfo -Filter 'state=2' | Select-Object replicationgroupname,replicatedfoldername

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.