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 -Filter 'state=2' | Select-Object replicationgroupname,replicatedfoldername

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)

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 )

Google+ photo

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

Connecting to %s