Partager via


GrantNamespaceAccessRights method of the MSFT_DfsNamespaceAccess class

Grants access permissions for a DFS folder to the specified users or groups.

Syntax

uint32 GrantNamespaceAccessRights(
  [in]  string                  NamespacePath,
  [in]  uint32                  AccessType,
  [in]  string                  AccountName[],
  [out] MSFT_DfsNamespaceAccess cmdletOutput[]
);

Parameters

NamespacePath [in]

The Universal Naming Convention (UNC) path of the DFS folder for which access is to be granted. The UNC path has a format of \\HostName\SharedName[\ObjectName]*, where:

  • The HostName component represents either the host name of a server or the domain name of a domain that hosts resources.
  • The SharedName component represents the share name or the name of the resource that is being accessed.
  • Each ObjectName component represents the name of a directory on the resource that is being accessed.

AccessType [in]

The type of access to be granted for the users or groups on a DFS folder.

enumerate (0)

The right to view and enumerate the contents of a DFS folder.

AccountName [in]

An array that contains the names of users or groups to be granted access.

cmdletOutput [out]

When this method returns, contains an array that represents output from the Grant-DFSNamespaceAccess cmdlet. This parameter is passed uninitialized.

Requirements

Minimum supported client
None supported
Minimum supported server
Windows Server 2012
Namespace
Root\Microsoft\Windows\dfsn
MOF
DfsNCimProv.mof
DLL
DfsNCimProv.dll

See also

MSFT_DfsNamespaceAccess