Remove-D09DistributiongroupMembers
SYNOPSIS
Remove members and managers from specified distribution groups.
SYNTAX
Remove-D09DistributiongroupMembers [-DLNames] <Array> [[-Members] <Array>] [[-Managers] <Array>]
[-UseOwnEXOAuthentication] [<CommonParameters>]
DESCRIPTION
The `Remove-D09DistributionGroupMembers` function removes specified members and managers from one or more distribution groups. It supports both email-based and username-based identification of members and managers. The function can use its own Exchange Online authentication or rely on an existing session.
EXAMPLES
EXAMPLE 1
Remove-D09DistributionGroupMembers -DLNames @("Group1", "Group2") -Members @("[email protected]", "[email protected]") -Managers @("[email protected]") -UseOwnEXOAuthentication
Removes specified members and managers from the distribution groups "Group1" and "Group2" using its own Exchange Online authentication session.
EXAMPLE 2
Removes the specified members identified by usernames from the distribution group "Group1".
PARAMETERS
-DLNames
An array of distribution group names from which members and managers will be removed.
Type: Array
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Members
An array of members to be removed from the specified distribution groups. Can be email addresses or usernames.
Type: Array
Parameter Sets: (All)
Aliases:
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Managers
An array of managers to be removed from the specified distribution groups. Can be email addresses or usernames.
Type: Array
Parameter Sets: (All)
Aliases:
Required: False
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-UseOwnEXOAuthentication
A switch to indicate whether the function should establish its own Exchange Online authentication session.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
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.