Were you able to resolve the issue,lmgmcg ? Feel free to leave a comment if you need further assistance!
Removing old DFS namespace server
HI,
I have DFS in place and had two Namespace servers as DC01 and DC02. Now DC01 is decommissioned as it was running 2012 R2.
When I try to delete the old namespace server from the DFS namespaces, I'm getting an error saying it cannot be removes as it does not exist or unreachable.
Due to this when I execute this command " dfsdiag /testdfsconfig /dfsroot:\mydomain.local\Share" its trying to reach old DC01 and DC02 both.
I've checked the ADSIEDIT and cannot see this under DFS-Configuration.
What should I do? Any suggestion to remove this stale server.
Thanks.
Windows for business | Windows Server | Networking | Network connectivity and file sharing
3 answers
Sort by: Most helpful
-
Tracy Le 8,150 Reputation points Independent Advisor
2026-05-16T04:16:00.27+00:00 -
Tracy Le 8,150 Reputation points Independent Advisor
2026-05-13T19:19:56.8066667+00:00 Hello lmgmcg,When a DFS namespace server is decommissioned ungracefully, stale metadata becomes orphaned within Active Directory and the local registry of your surviving nodes, which is why your diagnostic commands still attempt to query DC01. To forcibly clean this state, log into DC02, open an elevated Command Prompt, and execute
dfsutil /clean /server:DC01 /share:Shareto automatically purge the dead routing references.Next, open the Registry Editor (
regedit.exe) on DC02, navigate strictly to theHKLM\SOFTWARE\Microsoft\Dfs\Roots\DomainV2path, and delete any leftover subkeys that explicitly match the old DC01 configuration. Finally, executeRestart-Service dfsin PowerShell to force the DFS Namespace service to reload its configuration from Active Directory, effectively severing all ties to the decommissioned server.If this administrative cleanup procedure restores your namespace health and stops the diagnostic errors, please click "Accept Answer".
Tracy Le.
-
Q&A Assist2026-05-13T17:29:32.67+00:00 AI generated content. This question contains an answer created with AI from Q&A Assist. Learn moreRemove the stale DFS Namespace server by cleaning up both Active Directory and the local DFS configuration on the remaining namespace server, then restart the DFS Namespaces service.
- Verify and clean AD objects (if any remain)
- In ADSIEDIT, check under the DFS configuration container for any objects related to the old namespace or server:
- Domain-based DFSN in "Windows Server 2008 mode": look for
msDFS-NamespaceAnchorobjects. - Domain-based DFSN in "Windows 2000 Server mode": look for
fTDfsobjects.
- Domain-based DFSN in "Windows Server 2008 mode": look for
- If an object matching the namespace name still exists, delete that object and any child objects.
- Be aware that AD replication latency can delay propagation of this change to other domain controllers.
- In ADSIEDIT, check under the DFS configuration container for any objects related to the old namespace or server:
- Clean the DFS registry configuration on the remaining namespace server (DC02)
- On DC02, open Registry Editor and locate the DFS namespace configuration key for the affected namespace:
- Domain-based DFSN in "Windows Server 2008 mode":
HKEY_LOCAL_MACHINE\Software\Microsoft\Dfs\Roots\domainV2 - Domain-based DFSN in "Windows 2000 Server mode":
HKEY_LOCAL_MACHINE\Software\Microsoft\Dfs\Roots\Domain - Stand-alone DFSN:
HKEY_LOCAL_MACHINE\Software\Microsoft\Dfs\Roots\Standalone
- Domain-based DFSN in "Windows Server 2008 mode":
- Under the appropriate path, locate the key named exactly like the problematic namespace.
- Use
dfsutilto clean the stale configuration for the old server/share, for example:
Replacedfsutil /clean /server:<old_server_name> /share:<root_share_name> /verbose<old_server_name>with the decommissioned DC01 name and<root_share_name>with the DFS root share name. - If necessary, delete only the specific stale key entries manually, ensuring that keys for working namespaces are not removed.
- On DC02, open Registry Editor and locate the DFS namespace configuration key for the affected namespace:
- Restart the DFS Namespaces service
- On DC02, restart the DFS Namespaces service so the registry and AD changes are reloaded:
- For Windows Server 2008 and later:
- Either restart the
DFS Namespaceservice from Services.msc, or run:Get-Service -Name Dfs Start-Service -Name Dfs
- Either restart the
- For Windows Server 2008 and later:
- On DC02, restart the DFS Namespaces service so the registry and AD changes are reloaded:
- Remove the associated file share for the old namespace root (if still present)
- On any server that hosted the old namespace (DC01’s replacement or any other), remove the file share that was associated with the old DFS namespace root. Leaving this share in place can block recreation or cleanup of the namespace.
- Refresh DFS Management and re-test
- Close and reopen the DFS Management console, or remove and re-add the namespace in the console so it reloads the updated configuration.
- Run
dfsdiag /testdfsconfig /dfsroot:\\mydomain.local\Shareagain and confirm it no longer tries to contact DC01.
If the namespace configuration is corrupted and no valid backup exists, the remaining option (for a single DFS root server in a stand-alone or single-root configuration) is to delete the DFS namespace, perform a full DFS namespace cleanup on the root server, and then re-create the namespace.
References:
- About the DFS Namespaces service and its configuration data
- Error "The namespace cannot be queried. The remote procedure call failed" with DFS Namespaces
- Error "The namespace cannot be queried. The system cannot find the file specified" with DFS namespaces
- Error "The namespace cannot be queried. Not enough memory resources are available to process this command" with DFS Namespaces
- Error "The namespace cannot be queried. Element not found" with DFS Namespaces
- Error "The namespace cannot be queried. The device is not ready for use" with DFS Namespaces
- Error "The data is invalid" or "The namespace has no targets. This may be due to a corrupt or out of sync metadata" with DFS Namespaces
- Verify and clean AD objects (if any remain)