TestimoX

API Reference

Class

GpoOwnershipService

Namespace ADPlayground.Gpo
Assembly ADPlayground
Modifiers static

Gets and sets GPO owner information (groupPolicyContainer security descriptor owner).

Inheritance

  • Object
  • GpoOwnershipService

Methods

public static GpoOwnerInfo GetOwner(String domainName, Guid gpoId) #
Returns: GpoOwnerInfo

Reads the owner of a GPO AD object.

Parameters

domainName System.String requiredposition: 0
DNS domain name where the GPO resides.
gpoId System.Guid requiredposition: 1
GPO GUID (groupPolicyContainer objectGuid).

Returns

Ownership information, including owner SID and friendly display name when resolvable.

public static GpoOwnerInfo SetOwner(String domainName, Guid gpoId, String identity) #
Returns: GpoOwnerInfo

Sets the owner of a GPO AD object to the specified identity (name or SID).

Parameters

domainName System.String requiredposition: 0
DNS domain name where the GPO resides.
gpoId System.Guid requiredposition: 1
GPO GUID (groupPolicyContainer objectGuid).
identity System.String requiredposition: 2
New owner identity (SID, SAM, UPN, or DN).

Returns

Ownership information after applying the change (best-effort).