API Reference
EmptyGroupFinder
Provides methods for locating Active Directory groups based on member count and type while ignoring built-in and well-known administrative groups.
Inheritance
- Object
- EmptyGroupFinder
Methods
public static IEnumerable<String> FilterGroups(IEnumerable<ValueTuple<String, Int32, Int32, GroupType>> groups, GroupType groupType, Int32 minMemberCount = 0, Nullable<Int32> maxMemberCount = null) #IEnumerable<String>Filters provided group data to those that match member count thresholds and group type.
Parameters
- groups System.Collections.Generic.IEnumerable{System.ValueTuple{System.String,System.Int32,System.Int32,ADPlayground.GroupType}}
- Tuple of distinguished name, RID, member count and group type.
- groupType ADPlayground.GroupType
- Group type to filter for.
- minMemberCount System.Int32 = 0
- Minimum member count threshold.
- maxMemberCount System.Nullable{System.Int32} = null
- Maximum member count threshold or null for no maximum.
Returns
Collection of group distinguished names.
public static IEnumerable<String> GetEmptySecurityGroups(String domainName) #IEnumerable<String>Enumerates security groups in the specified domain that have zero members.
Parameters
- domainName System.String
- Target domain name.
Returns
Collection of group distinguished names.
public static IEnumerable<String> GetEmptySecurityGroups() #IEnumerable<String>Enumerates all domains in the current forest and returns empty security groups.
Returns
Collection of group distinguished names.
public static IEnumerable<String> GetGroupsByMemberCount(String domainName, GroupType groupType, Int32 minMemberCount = 0, Nullable<Int32> maxMemberCount = null) #IEnumerable<String>Enumerates groups in the specified domain that match member count thresholds and group type.
Parameters
- domainName System.String
- Target domain name.
- groupType ADPlayground.GroupType
- Group type to search for.
- minMemberCount System.Int32 = 0
- Minimum member count threshold.
- maxMemberCount System.Nullable{System.Int32} = null
- Maximum member count threshold or null for no maximum.
Returns
Collection of group distinguished names.
public static IEnumerable<String> GetGroupsByMemberCount(GroupType groupType, Int32 minMemberCount = 0, Nullable<Int32> maxMemberCount = null) #IEnumerable<String>Enumerates all domains in the current forest and returns groups that match member count thresholds and group type.
Parameters
- groupType ADPlayground.GroupType
- Group type to search for.
- minMemberCount System.Int32 = 0
- Minimum member count threshold.
- maxMemberCount System.Nullable{System.Int32} = null
- Maximum member count threshold or null for no maximum.
Returns
Collection of group distinguished names.