Skip to content

Remove-DLManager

SYNOPSIS

Remove a manager from a distribution list (DL).

SYNTAX

Remove-DLManager [-Identity] <String> [-Manager] <String[]> [[-Task] <Int32>] [-WhatIf] [-Confirm]
 [<CommonParameters>]

DESCRIPTION

The `Remove-DLManager` function removes one or more managers from a specified distribution list (DL). It connects to Exchange Online, validates the DL, and removes the specified managers. The function supports confirmation prompts and task logging.

EXAMPLES

EXAMPLE 1

Remove-DLManager -Identity "TeamDL" -Manager @("[email protected]", "[email protected]") -Task 12345

Removes the specified managers from the distribution list `TeamDL` and logs the action with task number 12345.

EXAMPLE 2

Remove-DLManager -Identity "ProjectDL" -Manager @("[email protected]")

Removes the specified manager from the distribution list `ProjectDL`.

PARAMETERS

-Identity

The identity of the distribution list from which the manager(s) will be removed (e.g., DisplayName or Alias).

Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Manager

An array of managers to be removed from the specified distribution list.

Type: String[]
Parameter Sets: (All)
Aliases:

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

-Task

The task number associated with the removal of the manager(s), used for logging purposes.

Type: Int32
Parameter Sets: (All)
Aliases:

Required: False
Position: 3
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi

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

-Confirm

Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf

Required: False
Position: Named
Default value: None
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.

INPUTS

OUTPUTS

NOTES