Partager via


NetDfsAddStdRootForced function

[This function is obsolete. You can create the root for a new stand-alone DFS namespace by calling the NetDfsAddStdRoot function.]

Creates a new stand-alone Distributed File System (DFS) namespace without checking for the availability or accessibility of the share corresponding to the DFS namespace. This allows an offline share to host a clustered DFS namespace.

Syntax

NET_API_STATUS NetDfsAddStdRootForced(
  _In_     LPWSTR ServerName,
  _In_     LPWSTR RootShare,
  _In_opt_ LPWSTR Comment,
  _In_     LPWSTR Store
);

Parameters

  • ServerName [in]
    Pointer to a string that specifies the name of the server that will host the new stand-alone DFS namespace. This parameter is required.

  • RootShare [in]
    Pointer to a string that specifies the name of the shared folder for the new stand-alone DFS namespace on the server that will host the namespace. This parameter is required.

  • Comment [in, optional]
    Pointer to a string that contains an optional comment associated with the DFS namespace.

  • Store [in]
    Pointer to a string that specifies the local file system path corresponding to the share that will host the new DFS namespace. This parameter is required and must be of the form:

    drive:\directory

Return value

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 privilege on the DFS server. For more information about calling functions that require administrator privileges, see Running with Special Privileges.

Requirements

Minimum supported client

None supported

Minimum supported server

Windows Server 2003

End of client support

None supported

End of server support

Windows Server 2003

Header

LmDfs.h (include LmDfs.h or Lm.h)

Library

Netapi32.lib

DLL

Netapi32.dll

See also

Network Management Overview

Network Management Functions

Distributed File System (DFS) Functions

NetDfsAddStdRoot

NetDfsRemoveStdRoot