IGPMSecurityInfo::RemoveTrustee method (gpmgmt.h)

Removes all policy-related permissions for the specified trustee. A trustee is a user, computer, or security group that can be granted permissions on a GPO, SOM, or WMI filter.

Syntax

HRESULT RemoveTrustee(
  [in] BSTR bstrTrustee
);

Parameters

[in] bstrTrustee

Required. The name or SID of the trustee for which all permissions should be removed. Names are in Security Accounts Manager (SAM) compatible format (Exampledomain\Someone). Use null-terminated string.

Return value

JScript

Returns S_OK if successful. Returns a failure code if an error occurs.

VB

Returns S_OK if successful. Returns a failure code if an error occurs.

Remarks

On successful removal of a permission, the method updates all enumerators returned by the get__NewEnum method, even if a removal occurs during the enumeration of elements.

For more information about policy-related permissions, see IGPM::CreatePermission. For more information about security groups, see How Security Groups are Used in Access Control in the Active Directory Programmer's Guide.

Requirements

Requirement Value
Minimum supported client Windows Vista
Minimum supported server Windows Server 2008
Target Platform Windows
Header gpmgmt.h
DLL Gpmgmt.dll

See also

IGPM

IGPMPermission

IGPMSecurityInfo

IGPMTrustee