Project Description

Modlink is a command-line method to enable and disable referrals for a folder target (aka link target) in Windows Server 2003 R2. Neither dfscmd.exe nor dfsutil.exe provides a way to do this in Windows Server 2003 R2. In response to the many requests we get for this functionality, we’ve posted some sample code that can be compiled into an executable tool for enabling and disabling referrals.




Here are the parameters for using the tool:

modlink <DfsEntryPath> <ServerName> <SharePathName> [<on|off>]

And here’s an example of disabling a referral:

modlink \\contoso.com\dfsroot\dir\sharename server1.contoso.com sharename off

The above command disables the folder target (aka link target) \\server1.contoso.com\sharename of the namespace folder \\contoso.com\dfsroot\dir\sharename.

If you are a Windows Server 2008 administrator:
Modlink functionality is now built in DFSUtil. You can enable and disable referrals by using the command:

dfsutil property state <DfsPath> [\\server\share]
------ STATE Commands Supported ------
Online Set state of folder or folder target to Online.
Offline Set state of folder or folder target to Offline.

Last edited Jul 2, 2008 at 1:23 AM by SSDTeam, version 17