Find and delete DFS target folder with inexistant share

David J 1 Reputation point
2021-10-11T12:42:40.947+00:00

Hi everybody, and thanks for your assistance by advance,

I have a lot of DFS server and namespace.
After many years of uses, I need to clean up some target.

Some target has still here, but the share behind the target folder doesn't exist anymore.

I want to find a way to find it with PowerShell, I've read the documentation about DFSN but nothing help me about that.

Actually, to find it the DFS target is still valid, I do this step :

  • Open namespace
  • Clic on target
  • right click on folder target and select "Open In Explorer"
  • If it's open the share it's good
  • If it's nop open the share but a local folder, i delete the DFS Folder.

Do this on multiple domain and multiple name space and folder ( Over 300+ per domain) i'ts a long way.

If someone could help me to do that with PowerShell, that will be great.

Thx all ;)

Windows for business Windows Server User experience PowerShell
0 comments No comments
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.