Поделиться через


GrantAccess method of the MSFT_SmbShare class

Updates a share's security descriptor to grant accounts permission to access a share.

Syntax

uint32 GrantAccess(
  [in]  string                          AccountName[],
  [in]  uint32                          AccessRight,
  [out] MSFT_SmbShareAccessControlEntry Output[]
);

Parameters

AccountName [in]

An array of strings containing the account names to which access will be granted.

AccessRight [in]

The access rights to be granted.

Output [out]

An array of instances of the MSFT_SmbShareAccessControlEntry class that represent the updated access control entries for the share.

Remarks

To grant access, all existing allow ACEs for the specified accounts are removed and replaced with ACEs that grant the specified access rights.

Requirements

Minimum supported client
Windows 8
Minimum supported server
Windows Server 2012
Namespace
Root\Microsoft\Windows\Smb
MOF
SmbWmiV2.mof
DLL
SmbWmiV2.dll

See also

MSFT_SmbShare