TestimoX

API Reference

Class

DomainAdminsCountChecker

Namespace ADPlayground.Groups
Assembly ADPlayground

Provides functionality to check the number of members in the Domain Admins group.

Inheritance

  • Object
  • DomainAdminsCountChecker

Constructors

public DomainAdminsCountChecker(Int32 memberLimit = 10, Func<String, Task<List<String>>> fetchAdmins = null, Func<IEnumerable<String>> enumerateDomains = null, Func<String, List<String>> fetchAdminsSync = null) #

Initializes a new instance of the DomainAdminsCountChecker class.

Parameters

memberLimit System.Int32 = 10 optionalposition: 0
Maximum allowed number of members before a warning is raised.
fetchAdmins System.Func{System.String,System.Threading.Tasks.Task{System.Collections.Generic.List{System.String}}} = null optionalposition: 1
Optional function to retrieve domain admin names for a domain.
enumerateDomains System.Func{System.Collections.Generic.IEnumerable{System.String}} = null optionalposition: 2
Optional function that returns domain names in the forest.
fetchAdminsSync System.Func{System.String,System.Collections.Generic.List{System.String}} = null optionalposition: 3
Optional synchronous function to retrieve domain admin names for a domain.

Methods

public Void CheckCount() #
Returns: Void

Checks the Domain Admins group membership count for every domain in the forest synchronously.

public async Task CheckCountAsync() #
Returns: Task

Checks the Domain Admins group membership count for every domain in the current forest.

public Void CheckCountForDomain(String domainName = null) #
Returns: Void

Checks the Domain Admins group membership count for a specific domain synchronously.

Parameters

domainName System.String = null optionalposition: 0
Target domain name or null for the current domain.
public async Task CheckCountForDomainAsync(String domainName = null) #
Returns: Task

Checks the Domain Admins group membership count for a specific domain and writes a warning if it exceeds the limit.

Parameters

domainName System.String = null optionalposition: 0
Target domain name or null for the current domain.
public List<String> GetDomainAdmins(String domainName) #
Returns: List<String>

Retrieves members of the Domain Admins group synchronously.

Parameters

domainName System.String requiredposition: 0
Target domain name.

Returns

List of SAM account names.

public Task<List<String>> GetDomainAdminsAsync(String domainName) #
Returns: Task<List<String>>

Retrieves the SAM account names of all members of the Domain Admins group.

Parameters

domainName System.String requiredposition: 0
Target domain name.

Returns

List of SAM account names.

Properties

public Int32 MemberLimit { get; set; } #

Maximum allowed number of Domain Admins group members.