Using the Windows Server 2008 DFSUTIL.EXE command line to manage DFS-Namespaces
The most common administration activities related to DFS-Namespaces can be performed using the “DFS Management” MMC. This will show up under “Administrative Tools” after you add the DFS role service in Server Manager. You can also add just the MMC for remote management of a DFS namespace server. You will find that in Server Manager, under Add Feature, Remote Server Administration Tools (RSAT), Role Administration Tools, File Services Tools.
Another way to manage DFS-N is to use DFSUTIL.EXE, which is a command line tool. There are plenty of options and you can perform pretty much any DFS-related activity, from creating a namespace to adding links to exporting the entire configuration to troubleshooting. This can be very handy for automating tasks by writing scripts or batch files. DFSUTIL.EXE is an in-box tool in Windows Server 2008 (as with the MMC, it is loaded with the DFS-Namespaces role service or with the RSAT for File Services Tools).
Please find below a table with a comprehensive list of the parameters and options available in DFSUTIL.EXE for Windows Server 2008. Please note that DFSUTIL.EXE had a different format for parameters in Windows Server 2003, but that old syntax still works in Windows Server 2008. The old syntax is listed in the last column, prefixed by “OLD:”. There is also an old DFSCMD.EXE, which still works, which is also mentioned prefixed by “OLD:”.
Parameters | Description | Usage and Exampes | Subcommands, notes and old syntax |
<None> | Manages DFS Namespaces, servers and clients | DfsutilDfsutil /oldcliDfsutil /? | SUBCOMMANDS:Root - Displays,creates,removes,imports,exports namespace roots.Link - Displays, creates, removes, or moves folders (links).Target - Displays,creates,modifies folder targets (link targets).Property - Displays or modifies a folder target or namespace server.Client - Displays or modifies client information or registry keys.Server - Displays or modifies namespace configuration on the server.Diag - Perform diagnostics or view dfsdirs/dfspath.Domain - Displays all domain-based namespaces in a domain.Cache - Displays or flushes the client cache.NOTES:* Use the Dfsutil /oldcli command to view the original Dfsutil syntax.* Use the /? parameter after any command to display help for the command.* Dfsutil commands use the original Distributed File System terminology, with updated DFS Namespaces terminology provided as explanation for most commands.* If you specify at the end of a command an object (such as a namespace server) about which you want information, most commands will display the information without requiring further parameters or commands. For example, when using the Dfsutil Root command, you can append a namespace root to the command to view information about the root. |
Root | Displays information about the namespace root. Dfsutil Root commands support creating, removing, importing or exporting namespace roots. | dfsutil root <\servershare> [Verbose]PARAMETERS:<\servershare>: UNC path to the namespace. Verbose: Show additional information while the tool is executing. EXAMPLES:dfsutil root \contoso.comDomainNamespace1 dfsutil root \srv1StandaloneNameSpace2 | SUBCOMMANDS:AddDom - Creates a new domain-based namespace.AddStd - Creates a new stand-alone namespace.Remove - Removes the namespace.Export - Exports the namespace configuration to a file.Import - Imports the namespace from another namespace or a file.ForceSync - Perform a Forced sync on the target of a namespace.OLD: dfsutil /Root:<DfsName> /View [/Verbose] |
RootAddDom | Creates a new domain based DFS namespace. | dfsutil root adddom <\servershare> [<Version>] [<Comment>]PARAMETERS:<\servershare>: UNC path to the namespace.<Comment>: Specifies an adminstrator comment for the namespace.<Version>: Version of the namespace, possible values are V1 or V2.V1 - Creates a Windows 2000 Server mode namespace. V2 - Creates a Windows Server 2008 mode namespace.EXAMPLES:dfsutil root addDom \srv1DomainNameSpace1 "This is V2 namespace"dfsutil root addDom \srv2DomainNameSpace2 dfsutil root addDom \srv3DomainNameSpace3 V1 "This is V1 Root" | NOTES: 1. To add new root targets, use "dfsutil target add" command.2. Default setting for creation of new namespace is V2.OLD: dfsutil /AddFtRoot /Server:<ServerName> /Share:<ShareName> /Comment:<Comment> |
RootAddStd | Creates a new stand-alone namespace. | dfsutil root addstd <\servershare> [<Comment>]PARAMETERS:<\servershare>: UNC Path to the namespace on the namespace server.<Comment>: Specifies an adminstrator comment for the namespace. EXAMPLES:dfsutil root addstd \srv1StandaloneNamesapce1 "Standalone Root"dfsutil root addstd \srv2StandaloneNamesapce2 | OLD: dfsutil /AddStdRoot /Server:<ServerName> /Share:<ShareName> /Comment:<Comment> |
RootRemove | Deletes the namespace root. | dfsutil root remove <\servershare>PARAMETERS:<\servershare>: UNC path to the namespace on the namespace server. EXAMPLES:dfsutil root remove \contoso.comDomainNamespace1 dfsutil root remove \srv1StandaloneNamespace2 | OLD: dfsutil /RemStdRoot /Server:<ServerName> /Share:<ShareName>OLD: dfsutil /RemFtRoot /Server:<ServerName> /Share:<ShareName>OLD: dfsutil /RemFtRoot:<RootName> /Server:<ServerName> /Share:<ShareName> |
RootExport | Exports the namespace configuration information to a file. | dfsutil root export <\servershare> <filename> [Verbose] [DownLevel]PARAMETERS:<\servershare>: UNC path to the namespace on the namespace server.<filename>: Name of the file that will store the namespace configuration in XML file format.Verbose: Displays detailed status of the export process.Downlevel: Saves the export file as a text file that is compatible with the version of Dfsutil that is included with the Windows Server 2003 Support Tools. EXAMPLES:dfsutil root export \contoso.comDomainNamespace1 C:dir1a.txt downleveldfsutil root export \srv1StandaloneNamespace1 C:dir1docroot.xml | OLD: dfsutil /Root:<DfsName> /Export:<File> [/Verbose] |
RootImport | Imports folders, folder targets and configuration information for a namespace from a file or another namespace. | dfsutil root import | SUBCOMMANDS:Set - Imports and overwrites the existing namespace.Merge - Imports and merges with the existing namespace.Compare - Compares the namespace with another namespace.BlobSize - Displays the approximate AD DS blob size. |
Root Import Set | Imports folders, folder targets and configuration information for a namespace from a file or another namespace and overwrites existing folders and folder targets. | dfsutil root import set <\srcservershare>|<filename> <\destservershare> [NoBackup] [Verbose]PARAMETERS:<\srcservershare>: UNC path to the namespace from which you want to import the configuration.<\destservershare> UNC path to the namespace to which you want to import the configuration.<filename>: Name of the xml file from which you want to import the namespace configuration.NoBackup: Does not create backup file to restore overwritten folders and folder targets.Verbose: Displays detailed status of the import process.EXAMPLES:dfsutil root import set \contoso.comNamespace1\contoso.comNamespace2 NoBackupdfsutil root import set C:dir1docroot.txt \srv1StandaloneNamespace1 | OLD: dfsutil /Root:<DfsName> /Import:<File> /Set|Merge|Compare [/Verbose] [/NoBackup] |
Root Import Merge | Imports folders, folder targets and configuration information for a namespace from a file and merges existing folders and folder targets. | dfsutil root import merge <filename> <\destservershare> [NoBackup] [Verbose]PARAMETERS:<\destservershare> : UNC path to the namespace to which you want to import the configuration.<filename> : Name of the xml file from which you want to import the namespace configuration.NoBackup : Does not create backup file to restore overwritten folders and folder targets.Verbose : Displays detailed status of the import process.EXAMPLES:dfsutil root import Merge C:dir1docroot.txt \srv1StandaloneNamespace1 | OLD: dfsutil /Root:<DfsName> /Import:<File> /Set|Merge|Compare [/Verbose] [/NoBackup] |
Root Import Compare | Compares a namespace on one server with the namespace configuration on another server or in a file. | dfsutil root import compare <\srcservershare>|<filename> <\destservershare> [Verbose]PARAMETERS:<\srcservershare> : UNC path to the namespace on the first namespace server that you want to compare.<\destservershare>: UNC path to the namespace on the second namespace server that you want to compare.<filename> : Name of the XML file that contains the namespace configuration that you want to compare.Verbose : Displays detailed status of the import process.EXAMPLES:dfsutil root import compare \contoso.comDomainNamespace1 \contoso.comDomainNamespace2 dfsutil root import compare C:dir1docroot.txt \srv1StandaloneNamespace1 | OLD: dfsutil /Root:<DfsName> /ImportRoot:<MasterDfsName> /Mirror|Compare [/Verbose] [/NoBackup] |
Root Import BlobSize | Displays the approximate size of Active Directory Domain Services (AD DS) Blob for the specified namespace import file. | dfsutil root import blobsize <filename>PARAMETERS:<filename> : Name of the XML file that stores the configuration of the namespace you want to analyze.EXAMPLES:dfsutil root import blobsize docroot.xml | OLD: dfsutil /Root:<DfsName> /Import:<File> /BlobSize |
RootForceSync | To initiate a forced DFS metadata resync operation on the DFS root target of a specified domain-based namespace using the Windows Server 2008 mode or standalone DFS namespace ForceSync command can be used .This is not supported on Windows Server 2003 based Namespaces. | dfsutil root forcesync <\servershare>PARAMETERS:<\servershare>: Server - Target of the namespaceForcesync will be performed on this target. share - Target share. EXAMPLES:dfsutil root forcesync \standaloneserverStandaloneNamespace1 dfsutil root forcesync \domainnamespaceserverDomainNamespace2 | NOTES:Do not specify <\domainroot>, use <\roottargetshare>. |
Link | Displays the information about the link(folder) and link(folder) targets. Link commands are used to create a new link, delete a link or move the links. | dfsutil link <DfsPath>PARAMETERS:<DfsPath>: UNC Path of DFS link. EXAMPLES:dfsutil link \contoso.comDomainNamespace1link1 dfsutil link \srv1StandaloneNamespace1link1 | SUBCOMMANDS:Add - Creates a new folder.Remove - Removes the specified folder.Move - Moves the folder to another location in the namespace. |
Link Add | Adds a folder (link) to the specified namespace. | dfsutil link add <DfsPath> <\serversharepath> [Restore] [<Comment>]PARAMETERS:<DfsPath>: UNC Path of DFS link to be created.<\serversharepath>: UNC Path to the share on the Target Server.Restore: Option to restore a DFS link.[<Comment>]: Comment for the LinkEXAMPLES:dfsutil link add \contoso.comDomainNamespace1link1 \servershare "This is a new Link"dfsutil link add \srv1StandaloneNamespace1dirlink1 \servershare | NOTES:1. Folders can be created with the restore option . In this case, the folder target does not need to be a SMB path. Use this for namespace paths ( \domainnamespace ), NFS shares or any folder target that you do not want to verify.2. To add another folder target to an existing folder, use the command "Dfsutil Target Add".OLD: dfsutil /AddLink /Path:<DfsPath> /Server:<LinkTargetServer> /Share:<TargetShare> /Comment:<Comment>OLD: Dfscmd /add \dfsnamedfssharepath \serversharepath [/restore] |
Link Remove | Deletes the folder (link) and any associated folder targets (link targets). | dfsutil link remove <DfsPath>PARAMETERS:<DfsPath>: UNC Path of DFS link to remove. EXAMPLES:dfsutil link remove \contoso.comDomainNamespace1link1 | OLD: dfsutil /RemoveLink /Path:<DfsPath> /Server:<LinkTargetServer> /Share:<TargetShare>OLD: Dfscmd /remove \dfsnamedfssharepath \serversharepath |
Link Move | Moves a folder (link) to another location in the namespace. When you specify a folder that contains other folder, all subfolders are moved as well. If a folder already exists in the new location, you can use the Replace option to delete the existing folder and replace it with the folder you want to move. You cannot move folders between namespaces. | dfsutil link move <OldDfsPath> <NewDfsPath> [Replace]PARAMETERS:<OldDfsPath>: The UNC path of the folder to move.<NewDfsPath>: The UNC path of the new location in the namespace for the folder.Replace: Replaces an existing folder with the folder that you are moving. EXAMPLES:Dfsutil Link Move \contoso.com/namespace1/programs \contoso.comnamespace1tools Dfsutil Link Move \srv1namespace1docs \srv1namespace1/public/docs | OLD: Dfscmd /move \dfsnamedfssharepath1 \dfsnamedfssharepath2 [/force] |
Target | Displays information about the folder target (link target) or namespace server (root target). Target commands are used to add, remove or modify the properties of a folder target or namespace server. | dfsutil target [<DfsPath>] <\serversharepath>PARAMETERS:<DfsPath>: UNC Path of DFS link.<\serversharepath>: UNC Path to the share on the Target Server. EXAMPLES:dfsutil target \contoso.comDomainNamespace1link1 \mytargetserverLinkTarget dfsutil target \mytargetserverRootTarget | SUBCOMMANDS:Add - Adds a new folder target.Remove - Removes the folder target.NOTES:To view properties of root target do not specify <DfsPath>.OLD: Dfscmd /view \dfsnamedfsshare [/partial | /full | /batch || /batchrestore] |
Target Add | Adds a folder target (link target) to an existing folder (link), or a namespace server (root target) to an existing namespace root. | dfsutil target add [<DfsPath>] <\serversharepath> [Restore]PARAMETERS:<DfsPath>: UNC Path of DFS Link.<\serversharepath>: UNC Path to the share on the Target Server.Restore: Restore option is used when link target is non-SMB path. EXAMPLES:dfsutil target add \contoso.comDomainNamespace1link1 \mytargetserverLinkTarget dfsutil target add \mytargetserverRootTarget | NOTES:1. To add new namespace servers to an existing namespace root, omit <DfsPath>.2. To create new namespace, use the "Dfsutil Root" command with the Adddom or Addstd parameters.3. Folder targets can be created with the restore option. In this case,the folder target does not need to be a SMB path. Use this for namespace paths ( \domainnamespace ), NFS shares or any folder target that you do not want to verify.OLD: Dfscmd /map \dfsnamedfssharepath \serversharepath [comment] [/restore] |
Target Remove | Deletes a folder target (link target) from a folder (link), or a namespace server (root target) from a namespace. | dfsutil target remove [<DfsPath>] <\serversharepath>PARAMETERS:<DfsPath>: DfsPath of a LinkTarget.<\serversharepath>: server is Link or Root Target Server and share is Target ShareEXAMPLES:Dfsutil Target Remove \contoso.comnamespace1programs \srv2apps Dfsutil Target Remove \srv1namespaceshare | NOTES:1. To delete a root target (namespace server) do not specify <DfsPath>. If the namespace server is the only namespace server in the namespace, then the namespace will be deleted.2. To remove all the namespace servers, use the "Dfsutil Root Remove" command.OLD: Dfscmd /unmap \dfsnamedfssharepath |
Property | Displays or modifies the properties of a folder target (link target) or namespace server (root target). | dfsutil property | SUBCOMMANDS:Sitecosting - Displays or modifies site costing for a namespace.RootScalability - Displays or modifies the namsespace polling mode.ABDE - Enable/Disable/View ABDE property of a Namespace.Insite - Displays or modifies the in-site property.TargetfailBack - Displays or modifies client fail back.ACL - Set/Get Security Information on the folder.State - Displays or modifies a folder target or namespace server.TTL - Displays or changes client referral caching.PriorityRank - Displays or changes the ordering method (priority rank).PriorityClass - Displays or changes the target priority.Comment - Set/View the comment for DFS namesapace or DFS link. |
PropertySitecosting | Displays whether site costing is enabled, and enables or disables it on the specified namespace. Enable site costing to force clients to evaluate inter-site link costs and choose the lowest cost folder target. Site costing is disabled by default. | dfsutil property sitecosting <DfsPath>PARAMETERS:<DfsPath>: Displays whether site costing is enabled on the specified namespace. EXAMPLES:dfsutil property sitecosting enable \contoso.comDomainNamespace1 dfsutil property sitecosting enable \srv1StandaloneNamespace1 | SUBCOMMANDS:Enable - Enable this property on the namespace.Disable - Disable this property on the namespace.NOTES:1) The path specified must be a namespace root, not a folder.2) This feature is only supported on servers Windows Server 2003 or Windows Server 2008.3) Domain Controller (DC) site costing is controlled separately on each DC using the following registry key:HKLMSystemCurrentControlSetServicesDfsParametersSiteCostedReferrals DWORD 1 or 0OLD: dfsutil /Root:<DfsName> /SiteCosting /Enable|Disable|Display [/Verbose] |
PropertyRootScalability | RootScalability is an expert-only command to increase performance of large deployments of DFS namespaces. When set, network traffic among DFS root servers is kept to a minimum. In addition, there will be less traffic between the primary DC and DFS servers.The drawback is that users may see outdated information from dfs servers at times. | dfsutil property rootscalability <DfsPath>PARAMETERS:<DfsPath>: Path of a root. EXAMPLES:dfsutil property RootScalability \contoso.comDomainNamespace1 | SUBCOMMANDS:Enable - Enable this property on the namespace.Disable - Disable this property on the namespace.NOTES:1) The path specified must be a root, not a link.2) This has no effect on standalone roots.3) This feature is only supported on Windows Server 2003 and higher.4) When RootScalability is enabled, it is not uncommon to see an event log message such as, "DFS could not access its private data from the DS...". While this error may still indicate a problem in DS connectivity, typically this occurs because the nearest DC has outdated DFS information (expected behavior when RootScalability is enabled).OLD: dfsutil /Root:<DfsName> /RootScalability /Enable|Disable|Display [/Verbose] |
Property ABDE | ABDE command is a quick way to check if Access Based Directory Enumeration is enabled or disabled on the NameSpace. This is the property of domain-based namespace using the Windows Server 2008 mode or Standalone Namespaces in Windows Server 2008. | dfsutil property abde <DfsPath>PARAMETERS:<DfsPath>: UNC path to the DFS namesapace. EXAMPLES:dfsutil property ABDE \contoso.comDomainNamespace1 dfsutil property ABDE \srv1StandaloneNamespace1 | SUBCOMMANDS:Enable - Enable this property on the namespace.Disable - Disable this property on the namespace.NOTES:When Access Based Directory Enumeration is enabled, the users can view their directories only if they have permissions. Links will have Security Descriptors associated with them. The users can view the links only for which they have permissions in the Security Descriptor. |
Property Insite | Insite can be used to make sure clients access only those replicas that are in the same site as the client. It can also be used to disable such behavior. | dfsutil property insite <DfsPath>PARAMETERS:<DfsPath>: UNC path of a DFS namespace or DFS link. EXAMPLES:dfsutil property Insite \contoso.comDomainNamespace1 dfsutil property Insite \srv1StandaloneNamespace1 | SUBCOMMANDS:Enable - Enable this property on the namespace or link.Disable - Disable this property on the namespace or link.NOTES:1) The path specified may be a root or a link.2) Access of Domain Controllers may be site-sensitive as well. That, however, is a DC specific property that must be enabled/disabled in the registry of relevant DC(s): HKLMSystemCurrentControlSetServicesDfsParametersInsiteReferrals: DWORD 1 or 0 OLD: dfsutil /Path:<DfsPath> /InSite /Enable|Disable|Display [/Verbose] |
Property TargetfailBack | Displays TargetfailBack property of root or link TargetFailback is an expert-only command to make sure clients failback to target servers that are closer to them after having failed over to a target that's potentially out of site. | dfsutil property targetfailback <DfsPath>PARAMETERS:<DfsPath>: UNC path of a DFS namesapace or DFS link. EXAMPLES:dfsutil property TargetfailBack \contoso.comDomainNamespace1 dfsutil property TargetfailBack \srv1StandaloneNamespace1 | SUBCOMMANDS:Enable - Enable this property on the namespace or link.Disable - Disable this property on the namespace or link.NOTES:1) The path specified may be a root or a link.2) This feature is only supported on Windows Server 2003 SP1 and higher.3) The clients must be running a newer operating system to take advantage of this feature.4) You may also enable/disable TargetFailback on SYSVOL/NETLOGON paths. That, however, is a DC specific property that must be set/reset in the registry of relevant DC(s): HKLMSystemCurrentControlSetServicesDfsParametersSysvolNetlogonTargetFailback: DWORD 1 or 0OLD: dfsutil /Path:<DfsPath> /TargetFailback /Enable|Disable|Display [/Verbose] |
Property ACL | ACL command is a quick way to set or get the ACLs on the link. | dfsutil property acl <DfsPath> [ShowSDDL]PARAMETERS:<DfsPath>: UNC Path of DFS link. ShowSddl: Option to display SDDL. EXAMPLES:dfsutil property ACL \contoso.comDomainNamespace1link1 dfsutil property ACL \standaloneserverNamespace1link1 showsddl | SUBCOMMANDS:Grant - Grant permissions for a user or group(trustee).Deny - Deny Permissions for user or group(trustee).Revoke - Revoke granted permissions for user or group.Set - Set Security Information on the folder from SDDL input.Reset - Remove the Security Descriptor associated with the folder.Control - Set Security control Information on the folder. |
Property State | Displays State of Root/RootTarget or Link/Link target | dfsutil property state <DfsPath> [<\servershare>]PARAMETERS:<DfsPath>: UNC path of a DFS namesapace or DFS link.<\servershare>: server is Target Server and share is share on Target Server. EXAMPLES:dfsutil property State \contoso.comDomainNamespace1link1 \servershare dfsutil property State \namespaceserverNamespace2 | SUBCOMMANDS:Online - Set state of root target or folder target to Online.Offline - Set state of root target or folder target to Offline.NOTES:1. In case of the Windows Server 2003, the state of the DFS namespace root or root target can not be changed to online or offline. But the state of the link and the link targets can be changed.2. In Windows 2000 Server and Windows Server 2008 the state of the DFS namespace root and root target can be changed to offline or online.OLD: dfsutil /Path:<DfsPath> /State /Server:<RootOrLinkTargetServer> /Share:<TargetShare> |
Property TTL | Displays the Timeout value of root or link. | dfsutil property ttl <DfsPath>PARAMETERS:<DfsPath>: UNC path of a DFS namesapace or DFS link. EXAMPLES:dfsutil property ttl \contoso.comDomainNamespace1 | SUBCOMMANDS:Set - Set this property of DFS namesapace or DFS link.OLD: dfsutil /Enable|Disable|Display [/Verbose] /Path:<DfsPath> {/TTL:<Timeout> /Set}|{/TTL /Display} [/Verbose] |
Property PriorityRank | TargetPriorityRank is a useful way to control client accesses to dfs target servers. | dfsutil property priorityrank <DfsPath> <\servershare> [Verbose]PARAMETERS:<DfsPath>: UNC path of a DFS namesapace or DFS link.<\servershare>: server is Target Server and share is share on Target Server.Verbose: Show additional information while the tool is executingEXAMPLES:dfsutil property PriorityRank \contoso.comDomainNamespace1 \srv1DomainNameSpace1 | SUBCOMMANDS:Set - Set this property of the root or link target.OLD: dfsutil /Path:<DfsPath> /TargetPriority /Server:<TargetServerName> /Share:<TargetShare> [/Display] [/Set] [/PriorityRank:<Rank> [/PriorityClass:<SiteCostNormal|GlobalHigh|SiteCostHigh|SiteCostLow|GlobalLow>] [/Verbose] |
Property PriorityClass | TargetPriorityClass is a useful way to control client accesses to DFS target servers. | dfsutil property priorityclass <DfsPath> <\servershare> [Verbose]PARAMETERS:<DfsPath>: UNC path of a DFS namesapace or DFS link.<\servershare>: server is Target Server and share is share on Target Server.Verbose: Show additional information while the tool is executingEXAMPLES:dfsutil property PriorityClass \contoso.comDomainNamespace1 \srv1DomainNameSpace1 | SUBCOMMANDS:Set - Set this property of the root or link target.NOTES:1) The Path can be a Domain based or a Standalone DFS path. It must lead toa root or a link.2) TargetPriority can be used in conjuction with site costing, insite and the like.3) GlobalPriorityClass will take precedence over the site cost. The default behavior is SiteCostNormalPriorityClass.OLD: dfsutil /Path:<DfsPath> /TargetPriority /Server:<TargetServerName> /S |
Comments
- Anonymous
January 01, 2003
PingBack from http://www.windowsaffinity.com/?p=895 - Anonymous
April 21, 2014
In this blog post, let me touch on a topic that I frequently get questions on from customers. Most namespace - Anonymous
November 27, 2017
For Info: the text in the last column in your table does not appear to be wrapping, and there is no scroll on it.