Commands › Exchange Online

Set-DynamicDistributionGroup

Exchange Online ExchangeOnlineManagement Set-*

Modify existing dynamic distribution groups.

Quick start script

# Set-DynamicDistributionGroup — quick start (serv365.ai)
# 1. Connect (app-only shown; interactive: omit the certificate parameters)
Connect-ExchangeOnline -CertificateThumbprint $thumb -AppId $appId -Organization $org

# 2. Capture the current state first — you cannot roll back what you never recorded
$before = Get-DynamicDistributionGroup
$before | Format-List

# 3. Make the change (dry run first)
Set-DynamicDistributionGroup -Identity <DynamicGroupIdParameter> -WhatIf
Set-DynamicDistributionGroup -Identity <DynamicGroupIdParameter>

# 4. Verify and diff
$after = Get-DynamicDistributionGroup
Compare-Object ($before | Out-String) ($after | Out-String)

Syntax

Set-DynamicDistributionGroup [-Identity] <DynamicGroupIdParameter>
 [-AcceptMessagesOnlyFrom <MultiValuedProperty>]
 [-AcceptMessagesOnlyFromDLMembers <MultiValuedProperty>]
 [-AcceptMessagesOnlyFromSendersOrMembers <MultiValuedProperty>]
 [-Alias <String>]
 [-ArbitrationMailbox <MailboxIdParameter>]
 [-BypassModerationFromSendersOrMembers <MultiValuedProperty>]
 [-ConditionalCompany <MultiValuedProperty>]
 [-ConditionalCustomAttribute1 <MultiValuedProperty>]
 [-ConditionalCustomAttribute10 <MultiValuedProperty>]
 [-ConditionalCustomAttribute11 <MultiValuedProperty>]
 [-ConditionalCustomAttribute12 <MultiValuedProperty>]
 [-ConditionalCustomAttribute13 <MultiValuedProperty>]
 [-ConditionalCustomAttribute14 <MultiValuedProperty>]
 [-ConditionalCustomAttribute15 <MultiValuedProperty>]
 [-ConditionalCustomAttribute2 <MultiValuedProperty>]
 [-ConditionalCustomAttribute3 <MultiValuedProperty>]
 [-ConditionalCustomAttribute4 <MultiValuedProperty>]
 [-ConditionalCustomAttribute5 <MultiValuedProperty>]
 [-ConditionalCustomAttribute6 <MultiValuedProperty>]
 [-ConditionalCustomAttribute7 <MultiValuedProperty>]
 [-ConditionalCustomAttribute8 <MultiValuedProperty>]
 [-ConditionalCustomAttribute9 <MultiValuedProperty>]
 [-ConditionalDepartment <MultiValuedProperty>]
 [-ConditionalStateOrProvince <MultiValuedProperty>]
 [-Confirm]
 [-CreateDTMFMap <Boolean>]
 [-CustomAttribute1 <String>]
 [-CustomAttribute10 <String>]
 [-CustomAttribute11 <String>]
 [-CustomAttribute12 <String>]
 [-CustomAttribute13 <String>]
 [-CustomAttribute14 <String>]
 [-CustomAttribute15 <String>]
 [-CustomAttribute2 <String>]
 [-CustomAttribute3 <String>]
 [-CustomAttribute4 <String>]
 [-CustomAttribute5 <String>]
 [-CustomAttribute6 <String>]
 [-CustomAttribute7 <String>]
 [-CustomAttribute8 <String>]
 [-CustomAttribute9 <String>]
 [-DirectMembershipOnly <Boolean>]
 [-DisplayName <String>]
 [-DomainController <Fqdn>]
 [-EmailAddresses <ProxyAddressCollection>]
 [-EmailAddressPolicyEnabled <Boolean>]
 [-ExpansionServer <String>]
 [-ExtensionCustomAttribute1 <MultiValuedProperty>]
 [-ExtensionCustomAttribute2 <MultiValuedProperty>]
 [-ExtensionCustomAttribute3 <MultiValuedProperty>]
 [-ExtensionCustomAttribute4 <MultiValuedProperty>]
 [-ExtensionCustomAttribute5 <MultiValuedProperty>]
 [-ForceMembershipRefresh]
 [-ForceUpgrade]
 [-GrantSendOnBehalfTo <MultiValuedProperty>]
 [-HiddenFromAddressListsEnabled <Boolean>]
 [-IgnoreDefaultScope]
 [-IncludedRecipients <WellKnownRecipientType>]
 [-MailTip <String>]
 [-MailTipTranslations <MultiValuedProperty>]
 [-ManagedBy <GeneralRecipientIdParameter>]
 [-MaxReceiveSize <Unlimited>]
 [-MaxSendSize <Unlimited>]
 [-ModeratedBy <MultiValuedProperty>]
 [-ModerationEnabled <Boolean>]
 [-Name <String>]
 [-Notes <String>]
 [-PhoneticDisplayName <String>]
 [-PrimarySmtpAddress <SmtpAddress>]
 [-RecipientContainer <OrganizationalUnitIdParameter>]
 [-RecipientFilter <String>]
 [-RejectMessagesFrom <MultiValuedProperty>]
 [-RejectMessagesFromDLMembers <MultiValuedProperty>]
 [-RejectMessagesFromSendersOrMembers <MultiValuedProperty>]
 [-ReportToManagerEnabled <Boolean>]
 [-ReportToOriginatorEnabled <Boolean>]
 [-RequireSenderAuthenticationEnabled <Boolean>]
 [-SendModerationNotifications <TransportModerationNotificationFlags>]
 [-SendOofMessageToOriginatorEnabled <Boolean>]
 [-SimpleDisplayName <String>]
 [-UMDtmfMap <MultiValuedProperty>]
 [-UpdateMemberCount]
 [-WhatIf]
 [-WindowsEmailAddress <SmtpAddress>]
 [<CommonParameters>]

Parameters (85)

ParameterTypeRequiredWhat it controls
-Identity DynamicGroupIdParameter yes The Identity parameter specifies the dynamic distribution group that you want to modify. You can use any value that uniquely identifies the dynamic distribution group. For example:
-AcceptMessagesOnlyFrom MultiValuedProperty The AcceptMessagesOnlyFrom parameter specifies who is allowed to send messages to this recipient. Messages from other senders are rejected.
-AcceptMessagesOnlyFromDLMembers MultiValuedProperty The AcceptMessagesOnlyFromDLMembers parameter specifies who is allowed to send messages to this recipient. Messages from other senders are rejected.
-AcceptMessagesOnlyFromSendersOrMembers MultiValuedProperty The AcceptMessagesOnlyFromSendersOrMembers parameter specifies who is allowed to send messages to this recipient. Messages from other senders are rejected.
-Alias String The Alias parameter specifies the Exchange alias (also known as the mail nickname) for the recipient. This value identifies the recipient as a mail-enabled object, and shouldn't be confused with multiple email...
-ArbitrationMailbox MailboxIdParameter This parameter is available only in on-premises Exchange.
-BypassModerationFromSendersOrMembers MultiValuedProperty The BypassModerationFromSendersOrMembers parameter specifies who is allowed to send messages to this moderated recipient without approval from a moderator. Valid values for this parameter are individual senders and...
-ConditionalCompany MultiValuedProperty The ConditionalCompany parameter specifies a precanned filter that's based on the value of the recipient's Company property.
-ConditionalCustomAttribute1 MultiValuedProperty The ConditionalCustomAttribute1 parameter specifies a precanned filter that's based on the value of the recipient's CustomAttribute1 property. You can specify multiple values separated by commas.
-ConditionalCustomAttribute10 MultiValuedProperty The ConditionalCustomAttribute10 parameter specifies a precanned filter that's based on the value of the recipient's CustomAttribute10 property. You can specify multiple values separated by commas.
-ConditionalCustomAttribute11 MultiValuedProperty The ConditionalCustomAttribute11 parameter specifies a precanned filter that's based on the value of the recipient's CustomAttribute11 property. You can specify multiple values separated by commas.
-ConditionalCustomAttribute12 MultiValuedProperty The ConditionalCustomAttribute12 parameter specifies a precanned filter that's based on the value of the recipient's CustomAttribute12 property. You can specify multiple values separated by commas.
-ConditionalCustomAttribute13 MultiValuedProperty The ConditionalCustomAttribute13 parameter specifies a precanned filter that's based on the value of the recipient's CustomAttribute13 property. You can specify multiple values separated by commas.
-ConditionalCustomAttribute14 MultiValuedProperty The ConditionalCustomAttribute14 parameter specifies a precanned filter that's based on the value of the recipient's CustomAttribute14 property. You can specify multiple values separated by commas.
-ConditionalCustomAttribute15 MultiValuedProperty The ConditionalCustomAttribute15 parameter specifies a precanned filter that's based on the value of the recipient's CustomAttribute15 property. You can specify multiple values separated by commas.
-ConditionalCustomAttribute2 MultiValuedProperty The ConditionalCustomAttribute2 parameter specifies a precanned filter that's based on the value of the recipient's CustomAttribute2 property. You can specify multiple values separated by commas.
-ConditionalCustomAttribute3 MultiValuedProperty The ConditionalCustomAttribute3 parameter specifies a precanned filter that's based on the value of the recipient's CustomAttribute3 property. You can specify multiple values separated by commas.
-ConditionalCustomAttribute4 MultiValuedProperty The ConditionalCustomAttribute4 parameter specifies a precanned filter that's based on the value of the recipient's CustomAttribute4 property. You can specify multiple values separated by commas.
-ConditionalCustomAttribute5 MultiValuedProperty The ConditionalCustomAttribute5 parameter specifies a precanned filter that's based on the value of the recipient's CustomAttribute5 property. You can specify multiple values separated by commas.
-ConditionalCustomAttribute6 MultiValuedProperty The ConditionalCustomAttribute6 parameter specifies a precanned filter that's based on the value of the recipient's CustomAttribute6 property. You can specify multiple values separated by commas.
-ConditionalCustomAttribute7 MultiValuedProperty The ConditionalCustomAttribute7 parameter specifies a precanned filter that's based on the value of the recipient's CustomAttribute7 property. You can specify multiple values separated by commas.
-ConditionalCustomAttribute8 MultiValuedProperty The ConditionalCustomAttribute8 parameter specifies a precanned filter that's based on the value of the recipient's CustomAttribute8 property. You can specify multiple values separated by commas.
-ConditionalCustomAttribute9 MultiValuedProperty The ConditionalCustomAttribute9 parameter specifies a precanned filter that's based on the value of the recipient's CustomAttribute9 property. You can specify multiple values separated by commas.
-ConditionalDepartment MultiValuedProperty The ConditionalDepartment parameter specifies a precanned filter that's based on the value of the recipient's Department property. You can specify multiple values separated by commas.
-ConditionalStateOrProvince MultiValuedProperty The ConditionalStateOrProvince parameter specifies a precanned filter that's based on the value of the recipient's StateOrProvince property. You can specify multiple values separated by commas.
-Confirm SwitchParameter The Confirm switch specifies whether to show or hide the confirmation prompt. How this switch affects the cmdlet depends on whether the cmdlet requires confirmation before proceeding.
-CreateDTMFMap Boolean This parameter is available only in on-premises Exchange.
-CustomAttribute1 String This parameter specifies a value for the CustomAttribute1 property on the recipient. You can use this property to store custom information about the recipient, and to identify the recipient in filters. The maximum...
-CustomAttribute10 String This parameter specifies a value for the CustomAttribute10 property on the recipient. You can use this property to store custom information about the recipient, and to identify the recipient in filters. The maximum...
-CustomAttribute11 String This parameter specifies a value for the CustomAttribute11 property on the recipient. You can use this property to store custom information about the recipient, and to identify the recipient in filters. The maximum...
-CustomAttribute12 String This parameter specifies a value for the CustomAttribute12 property on the recipient. You can use this property to store custom information about the recipient, and to identify the recipient in filters. The maximum...
-CustomAttribute13 String This parameter specifies a value for the CustomAttribute13 property on the recipient. You can use this property to store custom information about the recipient, and to identify the recipient in filters. The maximum...
-CustomAttribute14 String This parameter specifies a value for the CustomAttribute14 property on the recipient. You can use this property to store custom information about the recipient, and to identify the recipient in filters. The maximum...
-CustomAttribute15 String This parameter specifies a value for the CustomAttribute15 property on the recipient. You can use this property to store custom information about the recipient, and to identify the recipient in filters. The maximum...
-CustomAttribute2 String This parameter specifies a value for the CustomAttribute2 property on the recipient. You can use this property to store custom information about the recipient, and to identify the recipient in filters. The maximum...
-CustomAttribute3 String This parameter specifies a value for the CustomAttribute3 property on the recipient. You can use this property to store custom information about the recipient, and to identify the recipient in filters. The maximum...
-CustomAttribute4 String This parameter specifies a value for the CustomAttribute4 property on the recipient. You can use this property to store custom information about the recipient, and to identify the recipient in filters. The maximum...
-CustomAttribute5 String This parameter specifies a value for the CustomAttribute5 property on the recipient. You can use this property to store custom information about the recipient, and to identify the recipient in filters. The maximum...
-CustomAttribute6 String This parameter specifies a value for the CustomAttribute6 property on the recipient. You can use this property to store custom information about the recipient, and to identify the recipient in filters. The maximum...
-CustomAttribute7 String This parameter specifies a value for the CustomAttribute7 property on the recipient. You can use this property to store custom information about the recipient, and to identify the recipient in filters. The maximum...
-CustomAttribute8 String This parameter specifies a value for the CustomAttribute8 property on the recipient. You can use this property to store custom information about the recipient, and to identify the recipient in filters. The maximum...
-CustomAttribute9 String This parameter specifies a value for the CustomAttribute9 property on the recipient. You can use this property to store custom information about the recipient, and to identify the recipient in filters. The maximum...
-DirectMembershipOnly Boolean This parameter is available only in the cloud-based service.
-DisplayName String The DisplayName parameter specifies the display name of the dynamic distribution group. The display name is visible in the Exchange admin center and in address lists. The maximum length is 256 characters. If the...
-DomainController Fqdn This parameter is available only in on-premises Exchange.
-EmailAddresses ProxyAddressCollection The EmailAddresses parameter specifies all email addresses (proxy addresses) for the recipient, including the primary SMTP address. In on-premises Exchange organizations, the primary SMTP address and other proxy...
-EmailAddressPolicyEnabled Boolean This parameter is available only in on-premises Exchange.
-ExpansionServer String This parameter is available only in on-premises Exchange.
-ExtensionCustomAttribute1 MultiValuedProperty This parameter specifies a value for the ExtensionCustomAttribute1 property on the recipient. You can use this property to store custom information about the recipient, and to identify the recipient in filters. You...
-ExtensionCustomAttribute2 MultiValuedProperty This parameter specifies a value for the ExtensionCustomAttribute2 property on the recipient. You can use this property to store custom information about the recipient, and to identify the recipient in filters. You...
-ExtensionCustomAttribute3 MultiValuedProperty This parameter specifies a value for the ExtensionCustomAttribute3 property on the recipient. You can use this property to store custom information about the recipient, and to identify the recipient in filters. You...
-ExtensionCustomAttribute4 MultiValuedProperty This parameter specifies a value for the ExtensionCustomAttribute4 property on the recipient. You can use this property to store custom information about the recipient, and to identify the recipient in filters. You...
-ExtensionCustomAttribute5 MultiValuedProperty This parameter specifies a value for the ExtensionCustomAttribute5 property on the recipient. You can use this property to store custom information about the recipient, and to identify the recipient in filters. You...
-ForceMembershipRefresh SwitchParameter This parameter is available only in the cloud-based service.
-ForceUpgrade SwitchParameter The ForceUpgrade switch suppresses the confirmation message that appears if the object was created in a previous version of Exchange. You don't need to specify a value with this switch.
-GrantSendOnBehalfTo MultiValuedProperty The GrantSendOnBehalfTo parameter specifies who can send on behalf of this dynamic distribution group. Although messages send on behalf of the group clearly show the sender in the From field (`<Sender> on behalf of...
-HiddenFromAddressListsEnabled Boolean The HiddenFromAddressListsEnabled parameter specifies whether this recipient is visible in address lists. Valid values are:
-IgnoreDefaultScope SwitchParameter This parameter is available only in on-premises Exchange.
-IncludedRecipients WellKnownRecipientType The IncludedRecipients parameter specifies a precanned filter that's based on the recipient type. Valid values are:
-MailTip String The MailTip parameter specifies the custom MailTip text for this recipient. The MailTip is shown to senders when they start drafting an email message to this recipient. If the value contains spaces, enclose the value...
-MailTipTranslations MultiValuedProperty The MailTipTranslations parameter specifies additional languages for the custom MailTip text that's defined by the MailTip parameter. HTML tags are automatically added to the MailTip translation, additional HTML tags...
-ManagedBy GeneralRecipientIdParameter The ManagedBy parameter specifies an owner for the group. A dynamic group can only have one owner. The group owner is able to:
-MaxReceiveSize Unlimited This parameter is available only in on-premises Exchange.
-MaxSendSize Unlimited This parameter is available only in on-premises Exchange.
-ModeratedBy MultiValuedProperty The ModeratedBy parameter specifies one or more moderators for this recipient. A moderator approves messages sent to the recipient before the messages are delivered. A moderator must be a mailbox, mail user, or mail...
-ModerationEnabled Boolean The ModerationEnabled parameter specifies whether moderation is enabled for this recipient. Valid value are:
-Name String The Name parameter specifies the unique name of the dynamic distribution group. The maximum length is 64 characters. If the value contains spaces, enclose the value in quotation marks (").
-Notes String The Notes parameters specifies additional information about the object. If the value contains spaces, enclose the value in quotation marks (").
-PhoneticDisplayName String The PhoneticDisplayName parameter specifies an alternate spelling of the user's name that's used for text to speech in Unified Messaging (UM) environments. Typically, you use this parameter when the pronunciation and...
-PrimarySmtpAddress SmtpAddress The PrimarySmtpAddress parameter specifies the primary return email address that's used for the recipient. You can't use the EmailAddresses and PrimarySmtpAddress parameters in the same command.
-RecipientContainer OrganizationalUnitIdParameter The RecipientContainer parameter specifies a filter that's based on the recipient's location in Active Directory. Valid input for this parameter is an organizational unit (OU) or domain that's returned by the...
-RecipientFilter String The RecipientFilter parameter specifies a custom OPATH filter that's based on the value of any available recipient property. You can use any available Windows PowerShell operator, and wildcards and partial matches...
-RejectMessagesFrom MultiValuedProperty The RejectMessagesFrom parameter specifies who isn't allowed to send messages to this recipient. Messages from these senders are rejected.
-RejectMessagesFromDLMembers MultiValuedProperty The RejectMessagesFromDLMembers parameter specifies who isn't allowed to send messages to this recipient. Messages from these senders are rejected.
-RejectMessagesFromSendersOrMembers MultiValuedProperty The RejectMessagesFromSendersOrMembers parameter specifies who isn't allowed to send messages to this recipient. Messages from these senders are rejected.
-ReportToManagerEnabled Boolean The ReportToManagerEnabled parameter specifies whether delivery status notifications (also known as DSNs, non-delivery reports, NDRs, or bounce messages) are sent to the owners of the group (defined by the ManagedBy...
-ReportToOriginatorEnabled Boolean The ReportToOriginatorEnabled parameter specifies whether delivery status notifications (also known as DSNs, non-delivery reports, NDRs, or bounce messages) are sent to senders who send messages to this group. Valid...
-RequireSenderAuthenticationEnabled Boolean The RequireSenderAuthenticationEnabled parameter specifies whether to accept messages only from authenticated (internal) senders. Valid values are:
-SendModerationNotifications TransportModerationNotificationFlags The SendModerationNotifications parameter specifies when moderation notification messages are sent. Valid values are:
-SendOofMessageToOriginatorEnabled Boolean The SendOofMessageToOriginatorEnabled parameter specifies how to handle out of office (OOF) messages for members of the group. Valid values are:
-SimpleDisplayName String The SimpleDisplayName parameter is used to display an alternative description of the object when only a limited set of characters is permitted. Valid characters are:
-UMDtmfMap MultiValuedProperty This parameter is available only in on-premises Exchange.
-UpdateMemberCount SwitchParameter This parameter is available only in the cloud-based service.
-WhatIf SwitchParameter The WhatIf switch shows what the command does without making any changes. You don't need to specify a value with this switch.
-WindowsEmailAddress SmtpAddress The WindowsEmailAddress parameter specifies the Windows email address for this recipient. This is a common Active Directory attribute that's present in all environments, including environments without Exchange. Using...

Reference facts derived from Microsoft documentation, © Microsoft, licensed CC BY 4.0; restructured with original guidance by serv365.ai.