Link to home
Start Free TrialLog in
Avatar of alanlam123
alanlam123

asked on

DFS issue

Hi  

How to check the DFS issue and please note I running on Windows 2012 R2.

Server A is running on Singapore office and Server B is running in Melbourne site.

Please note i only have access in Server A  in Singapore office but not in Server B.

Recently there are few user complaining the files is row back to old Jan date instead of Feb.

Question how to write a Powershell script to proof the issue is due to "Replication issue".

As now the only option to restore back by going to ---> folder properties and "Previous version" to restore back.
Avatar of Dan McFadden
Dan McFadden
Flag of United States of America image

First thing to do is to check for backlogged files in DFS replication.  From an PowerShell console with an account that has administrative rights, run the following commands:

import-module dfsr
Get-DfsrBacklog | sort ReplicationGroup, sendingmember | ft -a

Open in new window


What this will do is display a table with information summarizing the replication groups, the sending server, the receiving server, the folder and the backlog count.  If you see anything above "0" that means there are files waiting to be replicated to the receiving server.

The second things to inspect, is how your DFS Namespace is configured as well as how your AD Sites are setup.

Connections into the DFS Namespace can be controlled (if configured correctly) by AD sites.  Meaning, that a computer making connection to a DFS Namespace folder, will do the following:

(summary of what happens...)
1.  verifies what AD site the computer is currently in
2.  asks AD for DFS Namespace servers in the current AD Site
3.  asks the Namespace servers what folders they have available
4.  depending on how the Namespace Referrals are setup, the computer establishes a connection to a Target Folder

The reason for this explanation is this... it is possible that computers/users are connecting to different target folder servers.  Meaning that changes can occur to the same file on both servers and DFS Replication will have to determine which file in conflict should be used as the most current copy and then stores the losing file in the Conflicts and Deleted list.  You can restored files from the location if necessary but the bigger question is how are the computers/users making connections to a target folder.

Another interesting command is:

dfsutil /pktinfo

Open in new window


The above command will list the client's (computer) information about the Namespace servers and what they support.

dfsutil /sitename:<YourServersFqdn>

Open in new window


The above command will tell you what AD Site the server belongs to.  Helpful for determining a connection profile.

Doing a Restore from Previous Backup will not necessarily solve your issue if your clients are connecting to a target folder on a different server.

Reference links:
1. DFS Replication Conflicted and Deleted overview:  https://blogs.technet.microsoft.com/filecab/2013/08/23/dfs-replication-in-windows-server-2012-r2-restoring-conflicted-deleted-and-preexisting-files-with-windows-powershell/

2.  DFSUtil reference:  https://technet.microsoft.com/en-us/library/cc736784(v=ws.10).aspx#BKMK_27

Dan
ASKER CERTIFIED SOLUTION
Avatar of Dan McFadden
Dan McFadden
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of alanlam123
alanlam123

ASKER

Thanks