Skip to content

Latest commit

 

History

History
149 lines (107 loc) · 4.92 KB

nf-lmdfs-netdfsremoveroottarget.md

File metadata and controls

149 lines (107 loc) · 4.92 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:lmdfs.NetDfsRemoveRootTarget
NetDfsRemoveRootTarget function (lmdfs.h)
Removes a DFS root target from a domain-based DFS namespace. If the root target is the last root target in the DFS namespace, this function removes the DFS namespace. This function can also be used to remove a stand-alone DFS namespace.
DFS_FORCE_REMOVE
NetDfsRemoveRootTarget
NetDfsRemoveRootTarget function [Distributed File System]
dfs.netdfsremoveroottarget
fs.netdfsremoveroottarget
lmdfs/NetDfsRemoveRootTarget
dfs\netdfsremoveroottarget.htm
Dfs
9a8c78f4-3170-4568-940c-1c51aebad3ae
12/05/2018
DFS_FORCE_REMOVE, NetDfsRemoveRootTarget, NetDfsRemoveRootTarget function [Distributed File System], dfs.netdfsremoveroottarget, fs.netdfsremoveroottarget, lmdfs/NetDfsRemoveRootTarget
lmdfs.h
LmDfs.h, Lm.h
Windows
Windows Vista with SP1
Windows Server 2008
Netapi32.lib
Netapi32.dll
Windows
19H1
NetDfsRemoveRootTarget
lmdfs/NetDfsRemoveRootTarget
c++
APIRef
kbSyntax
DllExport
Netapi32.dll
NetDfsRemoveRootTarget

NetDfsRemoveRootTarget function

-description

Removes a DFS root target from a domain-based DFS namespace. If the root target is the last root target in the DFS namespace, this function removes the DFS namespace. This function can also be used to remove a stand-alone DFS namespace.

-parameters

-param pDfsPath [in]

Pointer to a string that specifies the Universal Naming Convention (UNC) path of a DFS namespace.

For a stand-alone DFS namespace, this string should be in the following form:

\\ServerName\DfsName

where ServerName is the name of the server that hosts the DFS root target and DfsName is the name of the DFS namespace.

For a domain-based DFS namespace, this string should be in the following form:

\\DomainName\DomDfsName

where DomainName is the name of the domain that hosts the domain-based DFS namespace and DomDfsName is the name of the DFS namespace.

-param pTargetPath [in, optional]

Pointer to a null-terminated Unicode string that specifies the UNC path of a DFS root target for the DFS namespace that is specified in the pDfsPath parameter.

For a stand-alone DFS namespace, this parameter must be NULL. For a domain-based DFS namespace, the string should be in the following form:

\\ServerName\RootShare

where ServerName is the name of the server that hosts the DFS root target and RootShare is the name of the folder on the server.

-param Flags [in]

A flag that specifies the type of removal operation. For a stand-alone DFS namespace, this parameter must be zero. For a domain-based DFS namespace, it can be zero or the following value. If it is zero, this indicates a normal removal operation.

DFS_FORCE_REMOVE (0x80000000)

If this flag is specified for a domain-based DFS namespace, the root target is removed even if it is not accessible.

-returns

If the function succeeds, the return value is NERR_Success.

If the function fails, the return value is a system error code. For a list of error codes, see System Error Codes.

-remarks

The caller must have Administrator privileges on the DFS server.

The following list shows which parameter values you should specify, according to the desired result.

pDfsPath parameter pTargetPath parameter Result
\\DomainName\DomDfsName \\ServerName\RootShare Delete a Windows 2000 mode or Windows Server 2008 mode domain-based DFS root target. If the target is the last root target for the DFS namespace, the function also deletes the DFS namespace.
\\ServerName\DfsName NULL Delete a stand-alone DFS namespace.

-see-also

Distributed File System (DFS) Functions

NetDfsAddRootTarget

Network Management Functions

Network Management Overview