TestimoX

API Reference

Class

DnsAdminChecker

Namespace ADPlayground.Dns
Assembly ADPlayground

Provides methods to verify membership of the DnsAdmins group.

Inheritance

  • Object
  • DnsAdminChecker

Constructors

public DnsAdminChecker(IEnumerable<String> allowedAccounts = null, Func<String, Task<HashSet<String>>> fetchMembers = null, Func<IEnumerable<String>> enumerateDomains = null, Func<String, HashSet<String>> fetchMembersSync = null) #

Initializes a new instance of the DnsAdminChecker class.

Parameters

allowedAccounts System.Collections.Generic.IEnumerable{System.String} = null optionalposition: 0
Collection of SAM account names expected in the DnsAdmins group.
fetchMembers System.Func{System.String,System.Threading.Tasks.Task{System.Collections.Generic.HashSet{System.String}}} = null optionalposition: 1
Optional function returning DnsAdmins members.
enumerateDomains System.Func{System.Collections.Generic.IEnumerable{System.String}} = null optionalposition: 2
Optional function returning domain names to process.
fetchMembersSync System.Func{System.String,System.Collections.Generic.HashSet{System.String}} = null optionalposition: 3
Optional synchronous function returning DnsAdmins members.

Methods

public Void Check() #
Returns: Void

Checks all domains synchronously for unexpected DnsAdmins membership.

public async Task CheckAsync() #
Returns: Task

Checks all domains returned by the domain enumerator for unexpected DnsAdmins membership.

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

Checks the DnsAdmins group for a single domain synchronously.

Parameters

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

Checks the DnsAdmins group membership for a single domain and warns about unexpected accounts.

Parameters

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

Retrieves members of the DnsAdmins group synchronously.

Parameters

domainName System.String requiredposition: 0
Target domain name.

Returns

Set of SAM account names.

public Task<HashSet<String>> GetDnsAdminsAsync(String domainName) #
Returns: Task<HashSet<String>>

Retrieves members of the DnsAdmins group for the specified domain.

Parameters

domainName System.String requiredposition: 0
Target domain name.

Returns

Set of SAM account names.

Properties

public HashSet<String> AllowedAccounts { get; } #

Gets the list of allowed DnsAdmins accounts.