API Reference
Class
LapsPolicyDiscoveryService
Discovers OU targets that likely carry LAPS policy by inspecting GPO links and returns a primary candidate along with all evaluated targets. Uses LapsPolicyService to resolve effective values and attribution for each candidate.
Inheritance
- Object
- LapsPolicyDiscoveryService
Methods
DiscoverForDomain 2 overloads
public static DiscoveryView DiscoverForDomain(String domainName, Boolean excludeDomainControllersOu = true, Boolean includeDomainRoot = true, Boolean includeContainers = true, Boolean includeSites = false) #Returns:
DiscoveryViewDiscovers OU targets with linked GPOs under the specified domain and evaluates LAPS policy posture for each. The most complete policy is selected as Primary.
Parameters
- domainName System.String
- DNS domain name.
- excludeDomainControllersOu System.Boolean = true
- When true, excludes the Domain Controllers OU from candidates.
- includeDomainRoot System.Boolean = true
- When true, evaluates the domain root as a candidate target.
- includeContainers System.Boolean = true
- When true, includes CN= containers linked to the GPO.
- includeSites System.Boolean = false
- When true, includes site-linked GPOs during policy resolution.
Returns
A DiscoveryView with Primary and Targets.
public static DiscoveryView DiscoverForDomain(String domainName, LapsDiscoveryOptions options) #Returns:
DiscoveryViewDiscovers OU targets with linked GPOs under the specified domain and evaluates LAPS policy posture for each. The most complete policy is selected as Primary.
Parameters
- domainName System.String
- DNS domain name.
- options ADPlayground.Gpo.LapsPolicyDiscoveryService.LapsDiscoveryOptions
- Discovery options (exclude DC OU, include root/containers/sites, caps).
Returns
A DiscoveryView with Primary and Targets.