API Reference
PolicyAttributionService
Generic helper to attribute effective policy values (registry.pol + Security Template) to their winning source GPOs for any DN/Scope. Uses the same engine as Effective smoke (GpoEffectivePolicyReader) and returns PolicyAttribution rows (Setting/Key/Value/Effective/Sources).
Inheritance
- Object
- PolicyAttributionService
Methods
public static IReadOnlyList<PolicyAttribution> ResolveForDn(String domainName, String distinguishedName, RegistryPolicyScope scope, IEnumerable<ValueTuple<String, String, String, String>> items, Boolean includeSites = false, IEnumerable<String> siteNames = null) #IReadOnlyList<PolicyAttribution>Attributes the provided key/value pairs for an arbitrary DN and scope.
Parameters
- domainName System.String
- distinguishedName System.String
- scope ADPlayground.Gpo.Policy.RegistryPolicyScope
- items System.Collections.Generic.IEnumerable{System.ValueTuple{System.String,System.String,System.String,System.String}}
- includeSites System.Boolean = false
- siteNames System.Collections.Generic.IEnumerable{System.String} = null
public static IReadOnlyList<PolicyAttribution> ResolveForDn(String domainName, String distinguishedName, IReadOnlyList<ValueTuple<Guid, String>> orderedApplicableGpos, IEnumerable<ValueTuple<String, String, String, String>> items) #IReadOnlyList<PolicyAttribution>Attributes the provided key/value pairs for an arbitrary DN using a precomputed ordered list of applicable GPOs. Use this overload when the caller already evaluated applicability (WMI + security) to avoid recomputation.
Parameters
- domainName System.String
- DNS domain name.
- distinguishedName System.String
- Target distinguished name (OU/domain root).
- orderedApplicableGpos System.Collections.Generic.IReadOnlyList{System.ValueTuple{System.Guid,System.String}}
- Ordered list of applicable GPO identifiers with their owning domain names.
- items System.Collections.Generic.IEnumerable{System.ValueTuple{System.String,System.String,System.String,System.String}}
- Sequence of (Setting title, Key path, Value name, Effective string).
Returns
Rows with populated Sources list (all writers in order; last is winner).
public static IReadOnlyList<PolicyAttribution> ResolveForDomainControllers(String domainName, IEnumerable<ValueTuple<String, String, String, String>> items) #IReadOnlyList<PolicyAttribution>Attributes the provided key/value pairs for the Domain Controllers OU (Computer scope).
Parameters
- domainName System.String
- DNS domain name.
- items System.Collections.Generic.IEnumerable{System.ValueTuple{System.String,System.String,System.String,System.String}}
- Sequence of (Setting title, Key path, Value name, Effective string).
Returns
Rows with populated Sources list and display string.