API Reference
Class
DnsAdminChecker
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
- 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
- Optional function returning DnsAdmins members.
- enumerateDomains System.Func{System.Collections.Generic.IEnumerable{System.String}} = null
- Optional function returning domain names to process.
- fetchMembersSync System.Func{System.String,System.Collections.Generic.HashSet{System.String}} = null
- Optional synchronous function returning DnsAdmins members.
Methods
public Void Check() #Returns:
VoidChecks all domains synchronously for unexpected DnsAdmins membership.
public async Task CheckAsync() #Returns:
TaskChecks all domains returned by the domain enumerator for unexpected DnsAdmins membership.
public Void CheckDomain(String domainName = null) #Returns:
VoidChecks the DnsAdmins group for a single domain synchronously.
Parameters
- domainName System.String = null
- Target domain name or null for the current domain.
public async Task CheckDomainAsync(String domainName = null) #Returns:
TaskChecks the DnsAdmins group membership for a single domain and warns about unexpected accounts.
Parameters
- domainName System.String = null
- 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
- 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
- Target domain name.
Returns
Set of SAM account names.
Inherited Methods
Properties
public HashSet<String> AllowedAccounts { get; } #Gets the list of allowed DnsAdmins accounts.