Get-EaiDistributionGroupMembersRecursive


Module: Exchange_AddIn
Applies to: Exchange online and Exchange Server on premises.

Get-EaiDistributionGroupMembersRecursive

SYNOPSIS

Get all members of a distribution group, including nested groups.

SYNTAX

Get-EaiDistributionGroupMembersRecursive [[-GroupName] <String>] [<CommonParameters>]

DESCRIPTION

This function will get all members of a distribution group, including nested groups that could be within the distribution group itself.
This function also will look at any looping groups and skip them to prevent an infinite loop.
This function will not get members of a security group, only e-mail enabled distribution groups.
This function will not get members of a dynamic distribution group.
The output is a custom object with the following properties: TotalUserCount, TotalGroupCount, TotalCount
TotalUserCount is the number of recipients in the group all of the groups.
TotalGroupCount is the number of groups in the group and all of the groups that would get messages sent to them.
TotalCount is the total number of recipients and groups in the group and all of the groups that would get messages sent to them.

EXAMPLES

EXAMPLE 1

Get-EaiDistributionGroupMembersRecursive -GroupName 'IT department'

This will get all members of the 'IT department' distribution group, including nested groups.

EXAMPLE 2

Get-EaiDistributionGroupMembersRecursive -GroupName 'Sales Team' -Verbose

This will get all members of the 'Sales Team' distribution group, including nested groups, including any Verbose output.

PARAMETERS

-GroupName

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-groupsToSkip

This is a hidden parameter.

Type: ArrayList
Parameter Sets: (All)
Aliases:

Required: False
Position: 2
Default value: (new-object -TypeName System.Collections.ArrayList)
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.