Set-DistributionGroup

 

Applies to: Exchange Server 2007 SP1, Exchange Server 2007 SP2, Exchange Server 2007 SP3

Use the Set-DistributionGroup cmdlet to modify the settings of an existing distribution group.

Syntax

Set-DistributionGroup -Identity <DistributionGroupIdParameter> [-AcceptMessagesOnlyFrom <RecipientIdParameter[]>] [-AcceptMessagesOnlyFromDLMembers <RecipientIdParameter[]>] [-Alias <String>] [-Confirm [<SwitchParameter>]] [-CreateDTMFMap <$true | $false>] [-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>] [-DisplayName <String>] [-DomainController <Fqdn>] [-EmailAddresses <ProxyAddressCollection>] [-EmailAddressPolicyEnabled <$true | $false>] [-ExpansionServer <String>] [-GrantSendOnBehalfTo <MailboxOrMailUserIdParameter[]>] [-HiddenFromAddressListsEnabled <$true | $false>] [-IgnoreDefaultScope <SwitchParameter>] [-ManagedBy <GeneralRecipientIdParameter>] [-MaxReceiveSize <Unlimited>] [-MaxSendSize <Unlimited>] [-Name <String>] [-PrimarySmtpAddress <SmtpAddress>] [-RejectMessagesFrom <RecipientIdParameter[]>] [-RejectMessagesFromDLMembers <RecipientIdParameter[]>] [-ReportToManagerEnabled <$true | $false>] [-ReportToOriginatorEnabled <$true | $false>] [-RequireSenderAuthenticationEnabled <$true | $false>] [-SamAccountName <String>] [-SendOofMessageToOriginatorEnabled <$true | $false>] [-SimpleDisplayName <String>] [-UMDtmfMap <MultiValuedProperty>] [-UseRusServer <String>] [-WhatIf [<SwitchParameter>]] [-WindowsEmailAddress <SmtpAddress>]

Set-DistributionGroup [-AcceptMessagesOnlyFrom <RecipientIdParameter[]>] [-AcceptMessagesOnlyFromDLMembers <RecipientIdParameter[]>] [-Alias <String>] [-Confirm [<SwitchParameter>]] [-CreateDTMFMap <$true | $false>] [-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>] [-DisplayName <String>] [-DomainController <Fqdn>] [-EmailAddresses <ProxyAddressCollection>] [-EmailAddressPolicyEnabled <$true | $false>] [-ExpansionServer <String>] [-GrantSendOnBehalfTo <MailboxOrMailUserIdParameter[]>] [-HiddenFromAddressListsEnabled <$true | $false>] [-IgnoreDefaultScope <SwitchParameter>] [-Instance <DistributionGroup>] [-ManagedBy <GeneralRecipientIdParameter>] [-MaxReceiveSize <Unlimited>] [-MaxSendSize <Unlimited>] [-Name <String>] [-PrimarySmtpAddress <SmtpAddress>] [-RejectMessagesFrom <RecipientIdParameter[]>] [-RejectMessagesFromDLMembers <RecipientIdParameter[]>] [-ReportToManagerEnabled <$true | $false>] [-ReportToOriginatorEnabled <$true | $false>] [-RequireSenderAuthenticationEnabled <$true | $false>] [-SamAccountName <String>] [-SendOofMessageToOriginatorEnabled <$true | $false>] [-SimpleDisplayName <String>] [-UMDtmfMap <MultiValuedProperty>] [-UseRusServer <String>] [-WhatIf [<SwitchParameter>]] [-WindowsEmailAddress <SmtpAddress>]

Detailed Description

Distribution groups are used to consolidate groups of recipients into a single point of contact for e-mail messages. Distribution groups cannot be used to assign permissions to network resources in the Active Directory directory service. You can use the Set-DistributionGroup cmdlet to overwrite existing settings or to add new settings.

To run the Set-DistributionGroup cmdlet, the account you use must be delegated the following:

  • Exchange Recipient Administrator role

For more information about permissions, delegating roles, and the rights that are required to administer Microsoft Exchange Server 2007, see Permission Considerations.

Parameters

Parameter Required Type Description

Identity

Required

Microsoft.Exchange.Configuration.Tasks.DistributionGroupIdParameter

The Identity parameter specifies the object that you want to modify. The Identity parameter can take any of the following values for the distribution group:

  • Distinguished name (DN)

  • Canonical name

  • GUID

  • Name

  • Display name

  • Alias

  • Exchange DN

  • Primary Simple Mail Transfer Protocol (SMTP) address

The Identity parameter cannot be used if the Instance parameter is specified.

AcceptMessagesOnlyFrom

Optional

Microsoft.Exchange.Configuration.Tasks.RecipientIdParameter[]

The AcceptMessagesOnlyFrom parameter specifies the mailbox users, mail users and mail contacts who can send e-mail messages to this distribution group. You can also specify Microsoft Exchange as a valid recipient for this parameter. If you configure a distribution group to accept messages only from the Microsoft Exchange recipient, it will only receive system-generated messages.

The AcceptMessagesOnlyFrom parameter can take any of the following values for the valid senders:

  • Distinguished name (DN)

  • Canonical name

  • GUID

  • Name

  • Display name

  • Alias

  • Exchange DN

  • Primary SMTP e-mail address

By default, the value of this parameter is blank. This enables the distribution group to accept messages from all senders.

AcceptMessagesOnlyFromDLMembers

Optional

Microsoft.Exchange.Configuration.Tasks.RecipientIdParameter[]

The AcceptMessagesOnlyFromDLMembers parameter specifies the distribution groups whose members are allowed to send e-mail messages to this distribution group. You can use any of the following values for the allowed distribution groups:

  • Distinguished name (DN)

  • Canonical name

  • GUID

  • Name

  • Display name

  • Legacy Exchange DN

  • Primary SMTP e-mail address

By default, the value of this parameter is blank. This enables the distribution group to accept messages from all senders.

Alias

Optional

System.String

The Alias parameter can be used to specify the alias of the object. The value of Alias cannot contain spaces.

Confirm

Optional

System.Management.Automation.SwitchParameter

The Confirm parameter causes the command to pause processing and requires you to acknowledge what the command will do before processing continues. You don't have to specify a value with the Confirm parameter.

CreateDTMFMap

Optional

System.Boolean

This parameter specifies that a dual tone multi-frequency (DTMF) map be created for the distribution group.

CustomAttribute1

Optional

System.String

The CustomAttribute1 parameter specifies custom attributes. You can use these attributes to store additional information.

CustomAttribute10

Optional

System.String

The CustomAttribute10 parameter specifies custom attributes. You can use these attributes to store additional information.

CustomAttribute11

Optional

System.String

The CustomAttribute11 parameter specifies custom attributes. You can use these attributes to store additional information.

CustomAttribute12

Optional

System.String

The CustomAttribute12 parameter specifies custom attributes. You can use these attributes to store additional information.

CustomAttribute13

Optional

System.String

The CustomAttribute13 parameter specifies custom attributes. You can use these attributes to store additional information.

CustomAttribute14

Optional

System.String

The CustomAttribute14 parameter specifies custom attributes. You can use these attributes to store additional information.

CustomAttribute15

Optional

System.String

The CustomAttribute15 parameter specifies custom attributes. You can use these attributes to store additional information.

CustomAttribute2

Optional

System.String

The CustomAttribute2 parameter specifies custom attributes. You can use these attributes to store additional information.

CustomAttribute3

Optional

System.String

The CustomAttribute3 parameter specifies custom attributes. You can use these attributes to store additional information.

CustomAttribute4

Optional

System.String

The CustomAttribute4 parameter specifies custom attributes. You can use these attributes to store additional information.

CustomAttribute5

Optional

System.String

The CustomAttribute5 parameter specifies custom attributes. You can use these attributes to store additional information.

CustomAttribute6

Optional

System.String

The CustomAttribute6 parameter specifies custom attributes. You can use these attributes to store additional information.

CustomAttribute7

Optional

System.String

The CustomAttribute7 parameter specifies custom attributes. You can use these attributes to store additional information.

CustomAttribute8

Optional

System.String

The CustomAttribute8 parameter specifies custom attributes. You can use these attributes to store additional information.

CustomAttribute9

Optional

System.String

The CustomAttribute9 parameter specifies custom attributes. You can use these attributes to store additional information.

DisplayName

Optional

System.String

The DisplayName parameter can be used to specify the distribution group's name in the Exchange Management Console and in the Exchange global address list (GAL).

DomainController

Optional

Microsoft.Exchange.Data.Fqdn

To specify the fully qualified domain name (FQDN) of the domain controller that writes this configuration change to Active Directory, include the DomainController parameter.

EmailAddresses

Optional

Microsoft.Exchange.Data.ProxyAddressCollection

The EmailAddresses parameter can be used to specify the e-mail alias of the distribution group. All valid Microsoft Exchange Server 2007 e-mail address types may be used. You can specify multiple values for the EmailAddresses parameter as a comma-delimited list.

Important

Exchange 2007 does not validate custom addresses for correct formatting. You must make sure that the custom address that you specify complies with the format requirements for that address type. Because X.400 addresses are considered custom addresses in Exchange 2007, they are also not validated. Therefore, you must provide the correct syntax when you specify an X.400 address.

EmailAddressPolicyEnabled

Optional

System.Boolean

The EmailAddressPolicyEnabled parameter can be used to control applying e-mail address policies to this distribution group. Valid values are $true or $false. The default value is $true. By default, all applicable e-mail address policies are applied to this distribution group.

ExpansionServer

Optional

System.String

The ExpansionServer parameter specifies the Exchange server that is used to expand the distribution group. Enter the expansion server as a legacy Exchange DN value. The default behavior is to use the closest Exchange Server 2003 computer, or the closest Exchange 2007 server that has the Hub Transport server role installed.

GrantSendOnBehalfTo

Optional

Microsoft.Exchange.Configuration.Tasks.RecipientIdParameter

The GrantSendOnBehalfTo parameter specifies a mailbox user who can send on behalf of this distribution group. The GrantSendOnBehalfTo parameter can take any of the following values:

  • Distinguished name (DN)

  • GUID

  • Name

  • Display name

  • Canonical name

  • Legacy Exchange DN

  • Alias

  • Primary SMTP e-mail address

By default, the value of GrantSendOnBehalfTo is blank. This means that no other mailbox user has permission to send on behalf of this distribution group.

HiddenFromAddressListsEnabled

Optional

System.Boolean

The HiddenFromAddressListsEnabled parameter can be used to hide the distribution group from any Exchange address list. Valid values are $true or $false. The default value is $false.

IgnoreDefaultScope

Optional

System.Management.Automation.SwitchParameter

The IgnoreDefaultScope parameter instructs the command to ignore the default recipient scope setting for the Exchange Management Shell and use the entire forest as the scope. This allows the command to access Active Directory objects that are not currently in the default scope. Using the IgnoreDefaultScope parameter introduces the following restrictions:

  • You cannot use the DomainController parameter. The command will use an appropriate global catalog server automatically.

  • You can only use the DN for the Identity parameter. Other forms of identification, such as alias or GUID, are not accepted.

Instance

Optional

Microsoft.Exchange.Data.Directory.Management.DistributionGroup

The Instance parameter enables you to pass an entire object to the command to be processed. It is mainly used in scripts where an entire object must be passed to the command.

The Instance parameter cannot be used if the Identity parameter is specified.

ManagedBy

Optional

Microsoft.Exchange.Configuration.Tasks.GeneralRecipientIdParameter

The ManagedBy parameter specifies the name of the mailbox user, mail-enabled group, or mail-enabled contact that appears in the Managed by tab of the Active Directory object. You can use any of the following values for this parameter:

  • Distinguished name (DN)

  • Canonical name

  • GUID

  • Name

  • Display name

  • Legacy Exchange DN

  • Primary SMTP e-mail address

MaxReceiveSize

Optional

Microsoft.Exchange.Data.Unlimited

The MaxReceiveSize parameter can be used to set the maximum allowed e-mail message size that can be sent to this distribution group. When you enter a value, qualify the value with one of the following units:

  • B (bytes)

  • KB (kilobytes)

  • MB (megabytes)

  • GB (gigabytes)

  • TB (terabytes)

Unqualified values are treated as bytes. Valid values are 0 through 2147482624 bytes.

By default, the MaxReceiveSize parameter is set to unlimited.

MaxSendSize

Optional

Microsoft.Exchange.Data.Unlimited

The MaxSendSize parameter can be used to specify the maximum allowed e-mail message size that can be sent from this distribution group. When you enter a value, qualify the value with one of the following units:

  • B (bytes)

  • KB (kilobytes)

  • MB (megabytes)

  • GB (gigabytes)

  • TB (terabytes)

Unqualified values are treated as bytes. Valid values are 0 through 2147482624 bytes.

By default, the MaxSendSize parameter is set to unlimited.

Name

Optional

System.String

The Name parameter specifies the name of the distribution group. The Name parameter specifies the distribution group name in Active Directory Users and Computers and also in the Group Name field in the Exchange Management Console.

PrimarySmtpAddress

Optional

Microsoft.Exchange.Data.SmtpAddress

The PrimarySmtpAddress parameter specifies the primary return SMTP e-mail address for the distribution group. This parameter only has meaning if the distribution group has multiple SMTP e-mail addresses.

RejectMessagesFrom

Optional

Microsoft.Exchange.Configuration.Tasks.RecipientIdParameter[]

The RejectMessagesFrom parameter specifies mailbox users and mail-enabled contacts who are not allowed to send e-mail messages to this distribution group. You can use any of the following values for the prohibited senders:

  • Distinguished name (DN)

  • Canonical name

  • GUID

  • Name

  • Display name

  • Legacy Exchange DN

  • Primary SMTP e-mail address

By default, the value of this parameter is blank. This enables the distribution group to accept messages from all mailbox users and all mail-enabled contacts.

RejectMessagesFromDLMembers

Optional

Microsoft.Exchange.Configuration.Tasks.RecipientIdParameter[]

The RejectMessagesFromDLMembers parameter specifies the distribution groups who are not allowed to send e-mail messages to the distribution group. You can use any of the following values for the prohibited distribution groups:

  • Distinguished name (DN)

  • Canonical name

  • GUID

  • Name

  • Display name

  • Legacy Exchange DN

  • Primary SMTP e-mail address

By default, the value of this parameter is blank. This enables the distribution group to accept messages from all distribution groups.

ReportToManagerEnabled

Optional

System.Boolean

The ReportToManagerEnabled parameter allows delivery reports to be sent to the distribution group manager. Valid values are $true or $false. The default value is $false.

ReportToOriginatorEnabled

Optional

System.Boolean

The ReportToOriginatorEnabled parameter allows delivery reports to be sent to the senders of e-mail messages that are sent to this distribution group. Valid values are $true or $false. The default value is $true.

RequireSenderAuthenticationEnabled

Optional

System.Boolean

The RequireSenderAuthenticationEnabled parameter requires e-mail message delivery from authenticated senders. If the value is $true, messages are accepted only from authenticated senders. Valid values are $true or $false. The default value is $true.

SamAccountName

Optional

System.String

The SamAccountName parameter specifies the name for clients of the object that are running older operating systems. The SamAccountName parameter is displayed in Active Directory and in the Exchange Management Console in the Group name (pre-Windows 2000) field.

SendOofMessageToOriginatorEnabled

Optional

System.Boolean

The SendOofMessageToOriginatorEnabled parameter allows Out of Office messages to be delivered to the senders of e-mail messages that are sent to this distribution group. Valid values are $true or $false. The default value is $false.

SimpleDisplayName

Optional

System.String

The SimpleDisplayName parameter is used to display an alternative description of the object when only a limited set of characters is permitted. This limited set of characters consists of the following characters:

abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\"()+,-./:?

UMDtmfMap

Optional

Microsoft.Exchange.Data.MultiValuedProperty

This parameter specifies if you want to create a user-defined DTMF map for the UM-enabled distribution group. 

UseRusServer

Optional

System.String

noteNote:
This parameter is available only in Exchange 2007 SP2.

The UseRusServer parameter instructs the command to use the specified Mailbox server on which the Address List service is running to obtain and then set mailbox and Active Directory user attributes.

The Address List service is a component in the Exchange System Attendant service. The Address List service creates and maintains Exchange-specific attribute values in Active Directory. You can use the Address List service to update recipient objects in a domain by using specific information, such as address list membership and e-mail addresses.

WhatIf

Optional

System.Management.Automation.SwitchParameter

The WhatIf parameter instructs the command to simulate the actions that it would take on the object. By using the WhatIf parameter, you can view what changes would occur without having to apply any of those changes. You don't have to specify a value with the WhatIf parameter.

WindowsEmailAddress

Optional

Microsoft.Exchange.Data.SmtpAddress

The WindowsEmailAddress parameter specifies the value of the E-mail field of the Active Directory object.

Input Types

Return Types

Errors

Error Description

 

 

Exceptions

Exceptions Description

 

 

Example

The following code example shows how to use the Set-DistributionGroup command to change the display name to an existing distribution group that is named Accounting to Accounting Group.

Set-DistributionGroup -Identity "Accounting" -DisplayName "Accounting Group"