Set-EOPDistributionGroup

This cmdlet is available only in Exchange Online Protection.

Use the Set-EOPDistributionGroup cmdlet to modify distribution groups or mail-enabled security groups in standalone Exchange Online Protection (EOP) organizations without Exchange Online mailboxes. This cmdlet isn't available in EOP that's included with Exchange Enterprise CAL with Services licenses in on-premises Exchange; use the Set-DistributionGroup cmdlet instead.

Typically, standalone EOP organizations that also have on-premises Active Directory use directory synchronization to create users and groups in EOP. However, if you can't use directory synchronization, then you can use cmdlets to create and manage users and groups in EOP.

This cmdlet uses a batch processing method that results in a propagation delay of a few minutes before the results of the cmdlet are visible.

For information about the parameter sets in the Syntax section below, see Exchange cmdlet syntax (https://docs.microsoft.com/powershell/exchange/exchange-cmdlet-syntax).

Syntax

Set-EOPDistributionGroup
   [-Identity <DistributionGroupIdParameter>]
   [-Alias <String>]
   [-DisplayName <String>]
   [-ExternalDirectoryObjectId <String>]
   [-ManagedBy <String[]>]
   [-PrimarySmtpAddress <SmtpAddress>]
   [<CommonParameters>]

Description

You need to be assigned permissions before you can run this cmdlet. Although this topic lists all parameters for the cmdlet, you may not have access to some parameters if they're not included in the permissions assigned to you. To find the permissions required to run any cmdlet or parameter in your organization, see Find the permissions required to run any Exchange cmdlet.

Examples

Example 1

Set-EOPDistributionGroup -Identity "Security Team" -PrimarySmtpAddress NewSecTeamId@Contoso.com

This example changes the current SMTP address of the Security Team EOP distribution group to "NewSecTeamId@Contoso.com".

Parameters

-Alias

The Alias parameter specifies the alias of the distribution group.

The value of Alias can contain letters, numbers and the characters !, #, $, %, &, ', *, +, -, /, =, ?, ^, _, `, {, |, } and ~. Periods (.) are allowed, but each period must be surrounded by other valid characters (for example, help.desk). Unicode characters from U+00A1 to U+00FF are also allowed. The maximum length of the Alias value is 64 characters.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Exchange Online Protection
-DisplayName

The DisplayName parameter specifies the name of the distribution group in the Exchange admin center (EAC).

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Exchange Online Protection
-ExternalDirectoryObjectId

This parameter is reserved for internal Microsoft use.

Type:String
Position:Named
Default value:None
Accept pipeline input:True
Accept wildcard characters:False
Applies to:Exchange Online Protection
-Identity

The Identity parameter specifies the distribution group or mail-enabled security group that you want to modify. You can use any value that uniquely identifies the group. For example:

  • Name

  • Alias

  • Distinguished name (DN)

  • Canonical DN

  • Email address

  • GUID

Type:DistributionGroupIdParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Exchange Online Protection
-ManagedBy

The ManagedBy parameter specifies one or more group owners. A group must have at least one owner. You can use any value that uniquely identifies the owner. For example:

  • Name

  • Alias

  • Distinguished name (DN)

  • Canonical DN

  • <domain name>\<account name>

  • Email address

  • GUID

  • LegacyExchangeDN

  • SamAccountName

  • User ID or user principal name (UPN)

You can specify multiple owners by using the following syntax: @("<user1>","<user2>"...). The values that you specify will overwrite the current list of owners.

The users specified with the ManagedBy parameter aren't automatically members of the distribution group. If you want any of the owners to be added as members of the distribution group, you need to add them by using the Update-EOPDistributionGroupMember cmdlet.

Type:String[]
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Exchange Online Protection
-PrimarySmtpAddress

The PrimarySmtpAddress parameter specifies the primary return SMTP email address for the distribution group.

Type:SmtpAddress
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Exchange Online Protection

Inputs

Outputs