Dfscmd

Applies To: Windows Server 2003, Windows Server 2003 R2, Windows Server 2003 with SP1, Windows Server 2003 with SP2

Dfscmd

Manages a distributed file system from the command line.

Syntax

dfscmd /map \\ DFSName \ DFSShareName \ Path \\ ServerName \ ShareName \ Path [Comment] [/restore]

dfscmd /unmap \\ DFSName \ DFSShareName \ Path

dfscmd /add \\ DFSName \ DFSShareName \ Path \\ ServerName \ ShareName \ Path [/restore]

fscmd /remove \\ DFSName \ DFSShareName \ Path \\ ServerName \ ShareName \ Path

dfscmd /view \\ DFSName \ DFSShareName [/full] [/partial] [/batch] [/batchrestore]

Parameters
  • /map
    Creates a link and maps a link to a target. If the specified DFS root does not exist, dfscmd returns an error. When /restore is specified, dfscmd does not attempt to validate the destination path.
  • \\ DFSName \ DFSShareName \ Path
    The path used to access the distributed file system.
  • \\ ServerName \ ShareName \ Path
    The actual file system location mapped to a DFS link.
  • [Comment]
    An optional comment you can use to identify a target.
  • /unmap
    Deletes a DFS link and removes its targets from the DFS root.
  • /add
    Adds a target to the specified DFS link. If the specified link does not exist, dfscmd will return an error. When /restore is specified, dfscmd does not attempt to validate the destination path.
  • /remove
    Removes a target from the specified DFS link.
  • /view
    View details for the specified DFS root. When dfscmd /view is entered without additional parameters, dfscmd displays only the names of the root and its links. dfscmd /view /partial displays any comments associated with the root. dfscmd /view /full displays the names of the root and its links, any comments associated with the root, and any targets associated with the links. dfscmd /view /batch returns a batch script you can use to restore the root. dfscmd /view /batchrestore returns a similar batch script that does not attempt to validate the targets.
  • /?
    Displays help at the command prompt.
Remarks
  • If you use a path or a comment that contains spaces, wrap it in quotation marks.

  • When you remove a target using dfscmd /remove, you must specify the same link name that you used to create the link. For example, if you created the link using its DNS name, you must specify the DNS name when you use dfscmd /remove rather than the NetBIOS name. Consider using a consistent naming standard when you add links so it will be easier to remember later.

Examples

To create a link called SiteLicense under the DFS root \\Appserver\Apps\ that points to a target at \\Westcoast-ap1\Shared\Sitelic without validating the target, type:

dfscmd /map \\appserver\apps\SiteLicense \\westcoast-ap1\shared\sitelic /restore

To remove \\Midwest-ap3\Shared\Site as a target of DFS link \\Appserver\Apps\SiteLicense, type:

dfscmd /remove \\appserver\apps\SiteLicense \\midwest-ap3\shared\site To view the links and comment associated with the DFS root \\Appserver\Apps, type:

dfscmd /view \\appserver\apps /partial

Formatting legend

Format Meaning

Italic

Information that the user must supply

Bold

Elements that the user must type exactly as shown

Ellipsis (...)

Parameter that can be repeated several times in a command line

Between brackets ([])

Optional items

Between braces ({}); choices separated by pipe (|). Example: {even|odd}

Set of choices from which the user must choose only one

Courier font

Code or program output

See Also

Concepts

Distributed File System (DFS)
Add a DFS link
Add a DFS link
Add a target
Command-line reference A-Z
Command shell overview