How do I delete an orphaned share?

John Savill

January 8, 2000

1 Min Read
ITPro Today logo in a gray background | ITPro Today

A. An orphaned share is one that the directory it shares has beendeleted. If you delete a directory in Explorer that is shared any shares willautomatically removed. If you delete by a different method, such as from thecommand prompt then the share will be left and it may result in messages in theSystem Event Log of the form:

The server service was unable to recreate the share NTFAQ because thedirectory D:tfaq files no longer exists.

You can manually update the registry to remove these "rogue"shares.

  1. Start the registry editor (regedt32.exe)

  2. Move to HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServiceslanmanserverShares

  3. There is an entry for each share
    Click here to view image

  4. Select the entry for the share you wish to delete and select Delete from the Edit menu.

  5. Click Yes to the confirmation

  6. If the share had special security set it will also have an entry under the Security sub-key so move to Security (under Shares), select the share value name and delete

If you type net share the share name will still be displayed until thelanmanserver service is restarted. If you manually restart it will also stop theservices, net logon, computer browser and Distributed File System.

Another method (if you have access) is to use Server Manager in NT 4.0,connect to the machine and orphaned shares are grayed out, you can then deletethem. Windows 2000 Computer Manager does not display orphaned shares in adifferent colour making this approach impossible in Windows 2K.

About the Author

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like