TestimoX

API Reference

Class

ProtectedUsersChecker

Namespace ADPlayground.Groups
Assembly ADPlayground

Checks that privileged accounts are members of the Protected Users group.

Inheritance

  • Object
  • ProtectedUsersChecker

Constructors

public ProtectedUsersChecker(Func<String, Task<IEnumerable<String>>> fetchPrivileged = null, Func<String, Task<HashSet<String>>> fetchProtected = null, Func<IEnumerable<String>> enumerateDomains = null, Func<String, IEnumerable<String>> fetchPrivilegedSync = null, Func<String, HashSet<String>> fetchProtectedSync = null) #

Initializes a new instance of the ProtectedUsersChecker class.

Parameters

fetchPrivileged System.Func{System.String,System.Threading.Tasks.Task{System.Collections.Generic.IEnumerable{System.String}}} = null optionalposition: 0
Optional function returning privileged account names.
fetchProtected System.Func{System.String,System.Threading.Tasks.Task{System.Collections.Generic.HashSet{System.String}}} = null optionalposition: 1
Optional function returning Protected Users group members.
enumerateDomains System.Func{System.Collections.Generic.IEnumerable{System.String}} = null optionalposition: 2
Optional function returning domains to check.
fetchPrivilegedSync System.Func{System.String,System.Collections.Generic.IEnumerable{System.String}} = null optionalposition: 3
Optional synchronous function returning privileged account names.
fetchProtectedSync System.Func{System.String,System.Collections.Generic.HashSet{System.String}} = null optionalposition: 4
Optional synchronous function returning Protected Users group members.

Methods

public Void Check() #
Returns: Void

Checks membership across all domains synchronously.

public async Task CheckAsync() #
Returns: Task

Checks membership across all domains in the current forest.

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

Checks membership for a single domain synchronously and writes warnings for accounts missing protection.

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 membership for a single domain and writes warnings for accounts missing protection.

Parameters

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

Retrieves privileged account names for the specified domain synchronously.

Parameters

domainName System.String requiredposition: 0
Target domain name.

Returns

Collection of SAM account names.

public Task<IEnumerable<String>> GetPrivilegedAccountsAsync(String domainName) #
Returns: Task<IEnumerable<String>>

Retrieves privileged account names for the specified domain.

Parameters

domainName System.String requiredposition: 0
Target domain name.

Returns

Collection of SAM account names.

public HashSet<String> GetProtectedUsers(String domainName) #
Returns: HashSet<String>

Retrieves members of the Protected Users group synchronously.

Parameters

domainName System.String requiredposition: 0
Target domain name.

Returns

Set of SAM account names.

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

Retrieves members of the Protected Users group.

Parameters

domainName System.String requiredposition: 0
Target domain name.

Returns

Set of SAM account names.