TestimoX

API Reference

Class

OrphanedAdminCountFinder

Namespace ADPlayground.Users
Assembly ADPlayground
Modifiers static

Finds accounts with adminCount=1 that are no longer members of privileged groups.

Inheritance

  • Object
  • OrphanedAdminCountFinder

Methods

public static IEnumerable<String> FilterOrphanedAccounts(IEnumerable<ValueTuple<String, IEnumerable<String>>> accounts, IEnumerable<String> privilegedGroups) #
Returns: IEnumerable<String>

Filters a provided list of accounts to those not in privileged groups.

Parameters

accounts System.Collections.Generic.IEnumerable{System.ValueTuple{System.String,System.Collections.Generic.IEnumerable{System.String}}} requiredposition: 0
Tuple of account name and group memberships.
privilegedGroups System.Collections.Generic.IEnumerable{System.String} requiredposition: 1
Distinguished names of privileged groups.

Returns

Collection of SAM account names.

GetCleanupRecommendations 2 overloads
public static IEnumerable<String> GetCleanupRecommendations(String domainName, IEnumerable<String> privilegedGroups) #
Returns: IEnumerable<String>

Generates cleanup recommendation strings for orphaned adminCount accounts.

Parameters

privilegedGroups System.Collections.Generic.IEnumerable{System.String} requiredposition: 0
Distinguished names of privileged groups.
domainNames System.Collections.Generic.IEnumerable{System.String} = null requiredposition: 1
Domains to query. When null or empty, all domains in the current forest are used.

Returns

Collection of recommendation strings.

GetCleanupRecommendations(System.String domainName, System.Collections.Generic.IEnumerable{System.String} privilegedGroups) #

Convenience overload to query a single domain.

Parameters

domainName System.String required
privilegedGroups System.Collections.Generic.IEnumerable{System.String} required
GetOrphanedAccounts 2 overloads
public static IEnumerable<String> GetOrphanedAccounts(String domainName, IEnumerable<String> privilegedGroups) #
Returns: IEnumerable<String>

Returns the SAM account names of objects with adminCount=1 that are not members of any of the provided privileged groups.

Parameters

domainNames System.Collections.Generic.IEnumerable{System.String} requiredposition: 0
Domains to query. When null or empty, all domains in the current forest are used.
privilegedGroups System.Collections.Generic.IEnumerable{System.String} = null requiredposition: 1
Distinguished names of groups considered privileged.

Returns

Collection of SAM account names.

GetOrphanedAccounts(System.String domainName, System.Collections.Generic.IEnumerable{System.String} privilegedGroups) #

Convenience overload to query a single domain.

Parameters

domainName System.String required
privilegedGroups System.Collections.Generic.IEnumerable{System.String} required