GPPermissionCollection Class

 

A collection of GPPermission objects that represents a set of policy-related permissions that can be set on a particular object, such as a scope of management (SOM), a Group Policy object (GPO), or a Windows Management Instrumentation (WMI) filter.

Namespace:   Microsoft.GroupPolicy
Assembly:  Microsoft.GroupPolicy.Management (in Microsoft.GroupPolicy.Management.dll)

Inheritance Hierarchy

System.Object
  Microsoft.GroupPolicy.GPPermissionCollection

Syntax

public sealed class GPPermissionCollection : IList<GPPermission>, 
    ICollection<GPPermission>, IEnumerable<GPPermission>, IEnumerable, 
    IList, ICollection, IDisposable
public ref class GPPermissionCollection sealed : IList<GPPermission^>, 
    ICollection<GPPermission^>, IEnumerable<GPPermission^>, IEnumerable, 
    IList, ICollection, IDisposable
[<Sealed>]
type GPPermissionCollection = 
    class
        interface IList<GPPermission>
        interface ICollection<GPPermission>
        interface IEnumerable<GPPermission>
        interface IEnumerable
        interface IList
        interface ICollection
        interface IDisposable
    end
Public NotInheritable Class GPPermissionCollection
    Implements IList(Of GPPermission), ICollection(Of GPPermission),
    IEnumerable(Of GPPermission), IEnumerable, IList, ICollection,
    IDisposable

Properties

Name Description
System_CAPS_pubproperty Count

Gets the number of items in the collection.

System_CAPS_pubproperty Item[Int32]

Gets or sets the element at the specified index.

Methods

Name Description
System_CAPS_pubmethod Add(GPPermission)

Adds the permission specified in a GPPermission object to the GPPermissionCollection instance. You can add a permission that is above the level of existing permissions. For more information, see the Remarks section.

System_CAPS_pubmethod Clear()

Removes all GPPermission objects from the GPPermissionCollection instance.

System_CAPS_pubmethod CopyTo(GPPermission[], Int32)

Copies the elements of the GPPermissionCollection instance to the specified one-dimensional array of GPPermission objects, starting at the specified index (in the destination array).

System_CAPS_pubmethod Dispose()

System_CAPS_pubmethod Equals(Object)

(Inherited from Object.)

System_CAPS_protmethod Finalize()

(Overrides Object.Finalize().)

System_CAPS_pubmethod GetEnumerator()

Returns an enumerator that enumerates through the GPPermissionCollection instance.

System_CAPS_pubmethod GetHashCode()

(Inherited from Object.)

System_CAPS_pubmethod GetType()

(Inherited from Object.)

System_CAPS_pubmethod Remove(GPPermission)

Removes the permission specified in the specified GPPermission object from the GPPermissionCollection instance.

System_CAPS_pubmethod RemoveAt(Int32)

Removes the GPPermission object at the specified position from the GPPermissionCollection instance.

System_CAPS_pubmethod RemoveTrustee(IdentityReference)

Removes all policy-related permissions for the trustee that is specified by the IdentityReference from the GPPermissionCollection instance.

System_CAPS_pubmethod RemoveTrustee(String)

Removes all policy-related permissions for the trustee that has the specified name from the GPPermissionCollection instance.

System_CAPS_pubmethod ToString()

(Inherited from Object.)

Explicit Interface Implementations

Name Description
System_CAPS_pubinterfaceSystem_CAPS_privmethod ICollection<GPPermission>.Contains(GPPermission)

System_CAPS_pubinterfaceSystem_CAPS_privmethod ICollection<GPPermission>.Remove(GPPermission)

System_CAPS_pubinterfaceSystem_CAPS_privmethod IList<GPPermission>.IndexOf(GPPermission)

System_CAPS_pubinterfaceSystem_CAPS_privmethod IList<GPPermission>.Insert(Int32, GPPermission)

System_CAPS_pubinterfaceSystem_CAPS_privmethod ICollection.CopyTo(Array, Int32)

System_CAPS_pubinterfaceSystem_CAPS_privmethod IEnumerable.GetEnumerator()

System_CAPS_pubinterfaceSystem_CAPS_privmethod IList.Add(Object)

System_CAPS_pubinterfaceSystem_CAPS_privmethod IList.Clear()

System_CAPS_pubinterfaceSystem_CAPS_privmethod IList.Contains(Object)

System_CAPS_pubinterfaceSystem_CAPS_privmethod IList.IndexOf(Object)

System_CAPS_pubinterfaceSystem_CAPS_privmethod IList.Insert(Int32, Object)

System_CAPS_pubinterfaceSystem_CAPS_privmethod IList.Remove(Object)

System_CAPS_pubinterfaceSystem_CAPS_privmethod IList.RemoveAt(Int32)

System_CAPS_pubinterfaceSystem_CAPS_privproperty ICollection<GPPermission>.IsReadOnly

System_CAPS_pubinterfaceSystem_CAPS_privproperty ICollection.Count

System_CAPS_pubinterfaceSystem_CAPS_privproperty ICollection.IsSynchronized

System_CAPS_pubinterfaceSystem_CAPS_privproperty ICollection.SyncRoot

System_CAPS_pubinterfaceSystem_CAPS_privproperty IList.IsFixedSize

System_CAPS_pubinterfaceSystem_CAPS_privproperty IList.IsReadOnly

System_CAPS_pubinterfaceSystem_CAPS_privproperty IList.Item[Int32]

Remarks

This class wraps the IGPMSecurityInfo COM interface.

The GPPermissionCollection class represents a collection of GPPermission objects for a particular SOM, GPO, or WMI filter. However, although a GPPermissionCollection object is a collection object, it is not a typical collection object. This is because no action occurs if the Add method attempts to add a GPPermission object for a trustee and the permission is below the level of an existing permission for that trustee. For more information, see the Add method.

Windows Server 2003 or a later version of Windows is required to delegate the permission for RSoP logging and editing WMI filters.

For more information about policy-related permissions, see GPPermissionType.

Thread Safety

Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Microsoft.GroupPolicy Namespace

Return to top