You can use distribution groups to create e-mail distribution lists and security groups to assign permissions to shared resources. Distribution groups can be used only with e-mail applications to send e-mail messages to collections of users. You can use the Get-DistributionGroup cmdlet to query for existing distribution groups.

You need to be assigned permissions before you can run this cmdlet. Although all parameters for this cmdlet are listed in this topic, you may not have access to some parameters if they're not included in the permissions assigned to you. To see what permissions you need, see the "Distribution groups" entry in the Mailbox Permissions topic.

The Anr parameter specifies a string on which to perform an ambiguous name resolution (ANR) search. You can specify a partial string and search for objects with an attribute that matches that string. The default attributes searched are:

CommonName (CN)

DisplayName

FirstName

LastName

Alias

Credential

Optional

System.Management.Automation.PSCredential

The Credential parameter specifies the user name and password for accessing Active Directory. The default is the current user's credentials.

This parameter requires the creation and passing of a credential object. This credential object is created by using the Get-Credential cmdlet. For more information, see Get-Credential.

DomainController

Optional

Microsoft.Exchange.Data.Fqdn

The DomainController parameter specifies the fully qualified domain name (FQDN) of the domain controller that retrieves data from Active Directory.

Filter

Optional

System.String

The Filter parameter indicates the OPath filter used to filter recipients.

The Identity parameter specifies the identity of the distribution group object.

This parameter accepts the following values:

Alias

Example: JPhillips

Canonical DN

Example: Atlanta.Corp.Contoso.Com/Users/JPhillips

Display Name

Example: Jeff Phillips

Distinguished Name (DN)

Example: CN=JPhillips,CN=Users,DC=Atlanta,DC=Corp,DC=contoso,DC=com

Domain\Account

Example: Atlanta\JPhillips

GUID

Example: fb456636-fe7d-4d58-9d15-5af57d0354c2

Immutable ID

Example: fb456636-fe7d-4d58-9d15-5af57d0354c2@contoso.com

Legacy Exchange DN

Example: /o=Contoso/ou=AdministrativeGroup/cn=Recipients/cn=JPhillips

SMTP Address

Example: Jeff.Phillips@contoso.com

User Principal Name

Example: JPhillips@contoso.com

IgnoreDefaultScope

Optional

System.Management.Automation.SwitchParameter

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

You can't use the DomainController parameter. The command uses 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, aren't accepted.

You can't use the OrganizationalUnit and Identity parameters together.

You can't use the Credential parameter.

ManagedBy

Optional

Microsoft.Exchange.Configuration.Tasks.GeneralRecipientIdParameter

The ManagedBy parameter indicates the DN of the user or contact that manages the group.

This parameter accepts the following values:

Alias

Example: JPhillips

Canonical DN

Example: Atlanta.Corp.Contoso.Com/Users/JPhillips

Display Name

Example: Jeff Phillips

Distinguished Name (DN)

Example: CN=JPhillips,CN=Users,DC=Atlanta,DC=Corp,DC=contoso,DC=com

Domain\Account

Example: Atlanta\JPhillips

GUID

Example: fb456636-fe7d-4d58-9d15-5af57d0354c2

Immutable ID

Example: fb456636-fe7d-4d58-9d15-5af57d0354c2@contoso.com

Legacy Exchange DN

Example: /o=Contoso/ou=AdministrativeGroup/cn=Recipients/cn=JPhillips

SMTP Address

Example: Jeff.Phillips@contoso.com

User Principal Name

Example: JPhillips@contoso.com

Organization

Optional

Microsoft.Exchange.Configuration.Tasks.OrganizationIdParameter

This parameter is available for multi-tenant deployments. It isn't available for on-premises deployments. For more information about multi-tenant deployments, see Multi-Tenant Support.

The Organization parameter specifies the organization in which you'll perform this action. This parameter doesn't accept wildcard characters, and you must use the exact name of the organization.

The ReadFromDomainController parameter specifies that the user information is read from a domain controller in the user's domain. If you set the recipient scope to include all recipients in the forest, and if you don't use this parameter, it's possible that the user information is read from a global catalog with outdated information. If you use this parameter, multiple reads might be necessary to get the information.

Note:

By default, the recipient scope is set to the domain that hosts your Exchange servers.

RecipientTypeDetails

Optional

Microsoft.Exchange.Data.Directory.Recipient.RecipientTypeDetails[]

The RecipientTypeDetails parameter specifies the type of recipients returned. Recipient types are divided into recipient types and subtypes. Each recipient type contains all common properties for all subtypes. For example, the UserMailbox type represents a user account in Active Directory that has an associated mailbox. Because there are several mailbox types, each mailbox type is identified by the RecipientTypeDetails parameter. For example, a conference room mailbox has RecipientTypeDetails set to ConferenceRoomMailbox, whereas a user mailbox has RecipientTypeDetails set to UserMailbox.

You can select from the following values:

ConferenceRoomMailbox

Contact

DiscoveryMailbox

DynamicDistributionGroup

EquipmentMailbox

ExternalManagedContact

ExternalManagedDistributionGroup

LegacyMailbox

LinkedMailbox

MailboxPlan

MailContact

MailForestContact

MailNonUniversalGroup

MailUniversalDistributionGroup

MailUniversalSecurityGroup

MailUser

PublicFolder

RoleGroup

RoomList

RoomMailbox

SharedMailbox

SystemAttendantMailbox

SystemMailbox

User

UserMailbox

ResultSize

Optional

Microsoft.Exchange.Data.Unlimited

The ResultSize parameter indicates the maximum number of recipient objects returned.

SortBy

Optional

System.String

The SortBy parameter specifies the attribute used to sort the results.

This example retrieves all distribution groups whose names begin with the string "Marketing" and pipelines the object to the Format-Table command to display the distribution group names and who they're managed by.