Windows Tools

DFSUtil Syntax

Overview | Syntax | Examples | Related Tools Open Command Prompt

DFSUtil uses the following syntax:

One Step dfsutil [Parameters]

Parameters

Parameters that work on client or server

/view:\\ DfsName \ DfsShare [/dcname: DcName] [/export: FileName] [/level:{0|1}]
Views the metadata in \\ DfsName \ DfsShare. This parameter dumps the Active Directory-based Partition Knowledge Table (PKT), showing each directory in the DFS tree, the computers backing each directory, and their Active Directory site location. You can pipe the output with the |more command or send it to a text file for large DFS configurations. The DCName option is useful for "walking" a specific domain controller's view of the DFS configuration to check for inconsistencies in the DFS namespace due to latency in Active Directory replication.
/export: FileName
Exports the DFS metadata script to FileName.
/level:{0 | 1}
Specifies a level of viewing. A higher level shows more detail.
Example
/addroot: DomDfsName /server: ServerName /share: ShareName [/comment: Comment]
Creates a standalone or DomDfs root on ServerName at ShareName.
/remroot: DomDfsName /server: ServerName /share: ShareName
Removes a standalone or DomDfs root on ServerName at ShareName.
/import: FileName
Runs DFS metadata script from the file FileName.
/unmap:\\ DfsName \ DfsShare /root:\\ Server \ Share
Removes \\ Server \ Share from \\ DfsName \ DfsShare .
/scripthelp
Displays information on DFS metadata scripts at the command line.
/? or /help
Displays this syntax at the command line.

Parameters that work on client only

/pktinfo [/dfs] [/level:{0|1}]
Shows the parts of the DFS namespace cached by the client, the names of the servers participating in the DFS share, the clients’ randomization order of the participating servers, and the current "go to" server.
DFS servers store the DFS namespace and the servers backing up the namespace in a BLOB format in the registry (standalone DFS) or Active Directory (domain DFS). The DFS BLOB is formally known as the Partition Knowledge Table (PKT). DFS clients retrieve and cache each piece of the DFS namespace for a period of time determined by the server.
For Windows NT 4.0 DFS, DFS servers send the list of servers backing a piece of the DFS namespace in the same order. Clients randomize the list of servers to provide a degree of load balancing.
For Windows 2000 servers accessed by Windows 2000 DFS clients, the scrambling and site preference takes place on the server.
/dfs
Retrieves the data from Dfs.sys.
/level:{0|1}
Specifies a level of of detail to display. A higher level dumps more details.
Example
/pktflush
Flushes the local Partition Knowledge Table (PKT) cached by the client.
DFS clients cache the portions of the DFS namespace (PKT) for the duration of time specified in the Distributed File System Manager and referred to as the Time to Live (TTL). For DFS 4.1, the PKT was cached for a hard coded 7 days. Windows 2000 servers use 1800 seconds (30 minutes) as the default TTL. All Microsoft DFS clients delete the PKT for a given folder in the DFS tree if not accessed by the TTL expiration or when the client is rebooted, whichever occurs first.
Windows 2000-based computers support the DFS tab in Windows Explorer property sheet, which uses the NetDFSGetClientInfo() and NetDFSSetClientInfo() APIs to show the list of alternate paths residing in the volume, and which allows choosing another alternate (refresh PKT) without having to reboot or wait for TTL to expire.
Non-Windows 2000 DFS clients must reboot or wait for the TTL for a cached portion of the DFS tree to expire.
Example
/spcinfo [/all]
Dumps the SPC table.
/all
Dumps the SPC tables for all domains.
Example
/spcflush
Flushes the local SPC table.