API Reference
GpoSecurityTemplateService
Reads GptTmpl.inf (Security Template) from GPOs and computes effective values for a target DN, honoring link order, enforced/block inheritance and OU precedence. Designed for reuse by TestimoX and ADPlayground.PowerShell.
Inheritance
- Object
- GpoSecurityTemplateService
Methods
public static Void ClearTemplateCache(String domainName = null) #VoidClears the in-memory cache of per-GPO security template (GptTmpl.inf) data. When domainName is provided, only entries for that domain are removed.
Parameters
- domainName System.String = null
public static GpoSecurityTemplateSet GetEffectiveComputerTemplateForDomainControllers(String domainName) #GpoSecurityTemplateSetConvenience: effective machine template for Domain Controllers OU.
Parameters
- domainName System.String
public static GpoPrivilegeRightsSet GetEffectivePrivilegeRightsForDn(String domainName, String distinguishedName, Boolean includeSiteGpos = false, IEnumerable<String> siteNames = null) #GpoPrivilegeRightsSetComputes effective privilege rights for an arbitrary DN (OU/Domain root). Site GPOs optional.
Parameters
- domainName System.String
- distinguishedName System.String
- includeSiteGpos System.Boolean = false
- siteNames System.Collections.Generic.IEnumerable{System.String} = null
public static GpoPrivilegeRightsSet GetEffectivePrivilegeRightsForDn(String domainName, String distinguishedName, IReadOnlyList<Guid> orderedGpoIds) #GpoPrivilegeRightsSetReturns effective privilege rights using a pre-filtered GPO order (e.g., after applicability or loopback planning).
Parameters
- domainName System.String
- distinguishedName System.String
- orderedGpoIds System.Collections.Generic.IReadOnlyList{System.Guid}
public static GpoPrivilegeRightsSet GetEffectivePrivilegeRightsForDomainControllers(String domainName) #GpoPrivilegeRightsSetConvenience: effective privilege rights for Domain Controllers OU.
Parameters
- domainName System.String
public static GpoSecurityTemplateSet GetEffectiveTemplateForDn(String domainName, String distinguishedName, Boolean includeSiteGpos = false, IEnumerable<String> siteNames = null) #GpoSecurityTemplateSetComputes effective template for an arbitrary DN (OU/Domain root). Site GPOs optional.
Parameters
- domainName System.String
- distinguishedName System.String
- includeSiteGpos System.Boolean = false
- siteNames System.Collections.Generic.IEnumerable{System.String} = null
public static GpoSecurityTemplateSet GetEffectiveTemplateForDn(String domainName, String distinguishedName, IReadOnlyList<Guid> orderedGpoIds) #GpoSecurityTemplateSetComputes effective template for a DN using a pre-filtered ordered list of GPO identifiers (e.g., after WMI/security applicability evaluation).
Parameters
- domainName System.String
- distinguishedName System.String
- orderedGpoIds System.Collections.Generic.IReadOnlyList{System.Guid}
public static IEnumerable<RegistryTemplateEntry> GetEntriesForGpo(String domainName, Guid gpoId) #IEnumerable<RegistryTemplateEntry>Enumerates registry template entries for a specific GPO.
Parameters
- domainName System.String
- gpoId System.Guid
public static IEnumerable<PrivilegeRightAssignment> GetPrivilegeRightsForGpo(String domainName, Guid gpoId) #IEnumerable<PrivilegeRightAssignment>Enumerates privilege rights for a specific GPO.
Parameters
- domainName System.String
- gpoId System.Guid