So you have been using DFS for a while and is happy. But you still get some complaints. Smaller companies usually hear that employees have problems accessing the DFS from home on their own computers. In larger companies it is usually not allowed to use private computers anyway. But there we have the problem with partner or purchased companies having problems with the DFS. So what is up?

The common problem is that you still are using hostnames instead of FQDN. So what does that matter really? It works great on my workstation. Most commonly companies automatically tries with the domain that the computer is joined into. This works great for the employees computers but not others. So what is happening then? Suppose we have a company called Contoso with a domain called contoso.local (I know its bad to have a .local domain name). You request the DFS called \contoso.local\dfs, you will then contact the domain controllers in contoso.local domain and get which file servers are working as the root servers. If the response only contains netbios names the clients will try to attach the domain suffix from DNS (Unless configured differently using GPOs).

So I was at a customers doing a brief DFS analysis. So these are the scripts I ran to check the domainbased DFS. So these are some screenshots from a non-production environment:

Scripts:

Foreach ($DFSroot in (Get-DfsnRoot))
{
  ForEach ($namespaceserver in (Get-DfsnRootTarget -Path $DFSroot.NamespacePath))
  {
    if ($namespaceserver.targetpath -notmatch '\\\\[^.]+\..+\\.*')
    {
      Write-Host "$($DFSroot.NamespacePath) => $($namespaceserver.targetpath)"
    }
  }
}
If you get any hits here you need to fix the DFS root server. Do that and remove and readd the DFS Root server.
Foreach ($DFSroot in (Get-DfsnRoot))
{
  ForEach ($DFSFolder in (Get-DfsnFolder -Path "$($DFSroot.NamespacePath)\*"|Get-DFSnFolderTarget|?{$_.Path -notmatch '.*\.DFSFolderLink$'}))

  {
    if ($DFSFolder.TargetPath -notmatch '\\\\[^.]+\..+\\.*')
    {
      Write-Host "$($DFSFolder.Path) => $($DFSFolder.TargetPath)"
    }
  }
}

If you got any hits here just add a new target with a FQDN instead of just the netbios name. Dont forget to disable/remove the netbios target.

Happy FQDN your environment..