Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have the following AD DFS (Windows 2003 R2):

DFS Root name: members

DFS Link: me
DFS Link Target: \\myserver\meshare

DFS Link: you
DFS Link Target: \\myserver\youshare

I need to change all the link targets to \\theirserver, while keeping everything else the same. I have created the shares meshare and youshare on \\theirserver already, with the files they will hold.

How to accomplish this from command line (I will batch it)? Will "dfscmd /move" be the command to use? If so, what would the exact syntax be?

share|improve this question
It would be helpful to know whether you are running Windows Server 2003, or Server 2003 R2. – Jeff Miles Mar 11 '10 at 14:32
up vote 2 down vote accepted

The proper command is:

dfscmd /unmap "\\domain\members\me"
dfscmd /unmap "\\domain\members\you"

and then:

dfscmd /map "\\domain\members\me" "\\theirserver\meshare"
dfscmd /map "\\domain\members\you" "\\theirserver\youshare"

Too bad it there isn't a command that does both, in one shot.

share|improve this answer

For Server 2003 R2, try:

DFScmd /remove \\Domain\members\me \\myserver\meshare
DFScmd /remove \\Domain\members\you \\myserver\youshare

and then

DFScmd /add \\Domain\members\me \\theirserver\meshare
DFScmd /add \\Domain\members\you \\theirserver\youshare

For Server 2008, you could use the following commands:

dfsutil target remove \\domain\members\me \\myserver\meshare
dfsutil target remove \\domain\members\you \\myserver\youshare

and then

dfsutil target add \\domain\members\me \\theirserver\meshare
dfsutil target add \\domain\members\you \\theirserver\youshare
share|improve this answer
There are not such options for dfsutil. At least, not on Windows 2003 R2. – user1797 Mar 11 '10 at 15:14
I've updated my answer with alternate (older) commands, leaving the Server 2008 commands for reference. I've only got Server 2008 at my disposal, so I can't test the DFScmd. – Jeff Miles Mar 11 '10 at 15:36
The "/remove" option removes a replica from a DFS volume. I am not trying to do that. I want to either replace an existing target's link target, or remove specifics links, and re-add them with a different link target. – user1797 Mar 11 '10 at 15:48

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.