You receive “The system cannot find the file specified” when trying to remove a namespace server from DFS

Issue

When attempting to remove a namespace server from a domain based DFS namespace, you receive the following error: –

\\fqdn.domain\namespace: The namespace server \\SERVER\NAMESPACE cannot be forcibly removed. The system cannot find the file specified

Cause

This issue is caused due to an inconsistency with the namespace server list maintained in Active Directory.

Resolution

  1. Using adsiedit.msc, locate the DFS namespace object under the System\Dfs-Configuration container in the domain partition.
  2. Open the properties of the DFS namespace object and locate the remoteServerName attribute
  3. Edit the remoteServerName attribute and add the path to the namespace server and namespace folder you are trying to remove, for example \\SERVER\FOLDER
  4. Save the object and allow for Active Directory replication time to the domain controllers in the site where your DFS management console is running from
  5. Attempt to remove the DFS namespace server again