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 | |
---|---|---|
Count | Gets the number of items in the collection. |
|
Item[Int32] | Gets or sets the element at the specified index. |
Methods
Name | Description | |
---|---|---|
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. |
|
Clear() | Removes all GPPermission objects from the GPPermissionCollection instance. |
|
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). |
|
Dispose() | ||
Equals(Object) | (Inherited from Object.) |
|
Finalize() | (Overrides Object.Finalize().) |
|
GetEnumerator() | Returns an enumerator that enumerates through the GPPermissionCollection instance. |
|
GetHashCode() | (Inherited from Object.) |
|
GetType() | (Inherited from Object.) |
|
Remove(GPPermission) | Removes the permission specified in the specified GPPermission object from the GPPermissionCollection instance. |
|
RemoveAt(Int32) | Removes the GPPermission object at the specified position from the GPPermissionCollection instance. |
|
RemoveTrustee(IdentityReference) | Removes all policy-related permissions for the trustee that is specified by the IdentityReference from the GPPermissionCollection instance. |
|
RemoveTrustee(String) | Removes all policy-related permissions for the trustee that has the specified name from the GPPermissionCollection instance. |
|
ToString() | (Inherited from Object.) |
Explicit Interface Implementations
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