Applies to: Exchange Server 2007
Topic Last Modified: 2007-06-05

Use the New-DistributionGroup cmdlet to create a new distribution group.

Syntax

New-DistributionGroup -Name <String> -OrganizationalUnit <OrganizationalUnitIdParameter> -SamAccountName <String> -Type <Distribution | Security> [-Alias <String>] [-DisplayName <String>] [-DomainController <Fqdn>] [-ManagedBy <GeneralRecipientIdParameter>] [-TemplateInstance <PSObject>]

Parameters

Parameter Required Type Description

Name

Required

System.String

This parameter specifies the name for the new distribution group. The value that is specified in the Name parameter is also used for DisplayName if the DisplayName parameter is not specified.

The Name value can't exceed 64 characters.

If the values of Name and DisplayName are different:

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

  • DisplayName specifies the distribution group name in the Exchange Management Console and in the Exchange global address list (GAL).

OrganizationalUnit

Required

Microsoft.Exchange.Configuration.Tasks.OrganizationalUnitIdParameter

This parameter specifies where to create the distribution group in Active Directory by using canonical name syntax.

SamAccountName

Required

System.String

This parameter specifies the name for clients of the object that are running older operating systems. The SamAccountName parameter is displayed in Active Directory and the Exchange Management Console in the Group name (pre-Windows 2000) field. If the Alias parameter is not specified, the following conditions are true:

  • The value of SAMAccountName is used for the value of the Alias parameter, with any spaces converted to underscores.

  • SAMAccountName, with any spaces converted to underscores, is used to generate the primary Simple Mail Transfer Protocol (SMTP) e-mail address of the object.

Type

Required

Microsoft.Exchange.Management.RecipientTasks.GroupType

This parameter specifies the group type that will be created in Active Directory. The group's scope is always Universal. Valid values are Distribution or Security.

Alias

Optional

System.String

This parameter can be used to specify the alias of the distribution group. The Alias parameter is then used to generate the primary SMTP e-mail address of the object. The value of Alias can't contain spaces. If Alias is not specified, the value of SAMAccountName is used to generate the primary SMTP e-mail address, with any spaces converted to underscores.

DisplayName

Optional

System.String

This parameter can be used to specify the name of the distribution group in the Exchange Management Console and in the Exchange GAL. If the DisplayName parameter is not specified, the value of the Name parameter is used for DisplayName.

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.

ManagedBy

Optional

Microsoft.Exchange.Configuration.Tasks.GeneralRecipientIdParameter

This parameter can be used to specify 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

TemplateInstance

Optional

System.Management.Automation.PSObject

When an existing object is supplied to this parameter, the cmdlet uses that object to create a copy of the object.

Detailed Description

You can use the New-DistributionGroup cmdlet to create new Active Directory group objects of the following types:

  • Mail-enabled universal security group

  • Universal distribution group

Distribution groups are used to consolidate groups of recipients into a single point of contact for e-mail messages. Distribution groups can't be used to assign permissions to network resources in the Active Directory directory service.

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

  • Exchange Recipient Administrator role

  • Account Operator role for the applicable Active Directory containers

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

Input Types

Return Types

Errors

Error Description

 

 

Exceptions

Exceptions Description

 

 

Example

The following code example shows how to use the New-DistributionGroup cmdlet to create a new mail-enabled universal security group that has the following parameters:

  • The group's name will be "Managers".

  • The group will be created in the Users container in the domain Contoso.com.

  • The group's SAM account name will be "Managers".

  • The group type will be Security.

Copy Code
New-DistributionGroup -Name "Managers" -OrganizationalUnit "contoso.com/Users" -SAMAccountName "Managers" -Type "Security"