API Reference
Class
OrphanedAdminCountFinder
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}}}
- Tuple of account name and group memberships.
- privilegedGroups System.Collections.Generic.IEnumerable{System.String}
- 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}
- Distinguished names of privileged groups.
- domainNames System.Collections.Generic.IEnumerable{System.String} = null
- 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
- privilegedGroups System.Collections.Generic.IEnumerable{System.String}
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}
- Domains to query. When null or empty, all domains in the current forest are used.
- privilegedGroups System.Collections.Generic.IEnumerable{System.String} = null
- 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
- privilegedGroups System.Collections.Generic.IEnumerable{System.String}