Windows Server - Error 2321: The share must be removed from the Distribution File System before it can be deleted

Environment
  • Microsoft Windows Server 2003


Introduction
A server got this error, while stopping a file sharing
The system encountered the following error while attempting to delete share SharedFolder
Error 2321: The share must be removed from the Distribution File System before it can be deleted
Solution
Run this to check what is the root of distribution file system
C:\Documents and Settings\Administrator>dfsutil /server:FileServer /view

DFS Utility Version 5.2 (built on 5.2.3790.3959)
Copyright (c) Microsoft Corporation. All rights reserved.


Roots on machine FileServer

\Domain\FileServer
Done with Roots on machine FileServer

Done processing this command.
There is another way by checking registry (http://support.microsoft.com/kb/977511)
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Dfs\Roots\Standalone
Then, we solved this by stopped the Distributed File System service, and the file sharing