Skip to content

Set-DL

SYNOPSIS

Update the properties of a distribution list (DL).

SYNTAX

Set-DL [-Identity] <String> [-Name] <String> [-Suffix] <String> [[-Task] <Int32>] [-WhatIf] [-Confirm]
 [<CommonParameters>]

DESCRIPTION

The `Set-DL` function updates the properties of a specified distribution list (DL) in Exchange Online. It allows modifying the name, alias, and primary SMTP address of the DL. The function ensures proper validation of input parameters and integrates with Exchange Online.

EXAMPLES

EXAMPLE 1

Set-DL -Identity "TeamDL" -Name "New Team DL" -Suffix "example.com" -Task 12345

Updates the distribution list `TeamDL` with the new name "New Team DL" and the suffix "example.com".

EXAMPLE 2

Set-DL -Identity "ProjectDL" -Name "Updated Project DL"

Updates the distribution list `ProjectDL` with the new name "Updated Project DL".

PARAMETERS

-Identity

The identity of the distribution list to be updated.

Type: String
Parameter Sets: (All)
Aliases:

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

-Name

The new name for the distribution list.

Type: String
Parameter Sets: (All)
Aliases:

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

-Suffix

The email suffix for the distribution list. Defaults to `stad.gent`.

Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 3
Default value: Stad.gent
Accept pipeline input: False
Accept wildcard characters: False

-Task

The task number associated with the update of the distribution list, used for logging purposes.

Type: Int32
Parameter Sets: (All)
Aliases:

Required: False
Position: 4
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