3

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?

2 Answers2

2

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.

1

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
Jeff Miles
  • 2,065
  • 2
  • 19
  • 27
  • There are not such options for dfsutil. At least, not on Windows 2003 R2. –  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. –  Mar 11 '10 at 15:48