Applies to: Exchange Server 2013
Topic Last Modified: 2012-10-16
Use the New-AddressList cmdlet to create an address list and apply it to recipients.
For information about the parameter sets in the Syntax section below, see Syntax.
Syntax
New-AddressList [-RecipientFilter <String>]
<COMMON PARAMETERS>
|
New-AddressList [-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>] [-IncludedRecipients <None |
MailboxUsers | Resources | MailContacts | MailGroups | MailUsers |
AllRecipients>] <COMMON PARAMETERS>
|
COMMON PARAMETERS: -Name <String> [-Confirm
[<SwitchParameter>]] [-Container
<AddressListIdParameter>] [-DisplayName <String>]
[-DomainController <Fqdn>] [-Organization
<OrganizationIdParameter>] [-RecipientContainer
<OrganizationalUnitIdParameter>] [-WhatIf
[<SwitchParameter>]]
|
Examples
EXAMPLE 1
This example creates the address list MyAddressList. The address list includes recipients that are mailbox users and have the StateOrProvince property set to Washington or Oregon.
Copy Code | |
---|---|
New-AddressList -Name MyAddressList -RecipientFilter {((RecipientType -eq 'MailboxUser') -and ((StateOrProvince -eq 'Washington') -or (StateOrProvince -eq 'Oregon')))} |
EXAMPLE 2
This example creates the address list MyAddressList2 that includes mailboxes that have the ConditionalStateOrProvince parameter set to Washington.
Copy Code | |
---|---|
New-AddressList -Name MyAddressList2 -ConditionalStateOrProvince Washington -IncludedRecipients MailboxUsers |
EXAMPLE 3
This example creates the address list AL_AgencyB that includes mailboxes that have the value of the CustomAttribute15 parameter contains AgencyB.
Copy Code | |
---|---|
New-AddressList -Name "AL_AgencyB" -RecipientFilter {((RecipientType -eq 'MailboxUser') -and (CustomAttribute15 -like *AgencyB*))} |
Detailed Description
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 "Address lists" entry in the Email Address and Address Book Permissions topic.
Parameters
Parameter | Required | Type | Description |
---|---|---|---|
Name |
Required |
System.String |
The Name parameter specifies the name for the new address list. The name can't exceed 64 characters, and it can't include a carriage return or a backslash (\). |
ConditionalCompany |
Optional |
Microsoft.Exchange.Data.MultiValuedProperty |
The ConditionalCompany parameter is a filter to specify a company. All recipients with a company attribute that matches the value that you input for this parameter are included in the address list. You can use multiple values as a comma-delimited list. You can't use this parameter if you use the RecipientFilter parameter. You must use either the RecipientFilter parameter or one of these filter parameters:
|
ConditionalCustomAttribute1 |
Optional |
Microsoft.Exchange.Data.MultiValuedProperty |
The ConditionalCustomAttribute1 to
ConditionalCustomAttribute15 parameters specify filters for
recipients' custom attributes. For example, if you set the
ConditionalCustomAttribute1 value to |
ConditionalCustomAttribute10 |
Optional |
Microsoft.Exchange.Data.MultiValuedProperty |
The ConditionalCustomAttribute1 to
ConditionalCustomAttribute15 parameters specify filters for
recipients' custom attributes. For example, if you set the
ConditionalCustomAttribute1 value to |
ConditionalCustomAttribute11 |
Optional |
Microsoft.Exchange.Data.MultiValuedProperty |
The ConditionalCustomAttribute1 to
ConditionalCustomAttribute15 parameters specify filters for
recipients' custom attributes. For example, if you set the
ConditionalCustomAttribute1 value to |
ConditionalCustomAttribute12 |
Optional |
Microsoft.Exchange.Data.MultiValuedProperty |
The ConditionalCustomAttribute1 to
ConditionalCustomAttribute15 parameters specify filters for
recipients' custom attributes. For example, if you set the
ConditionalCustomAttribute1 value to |
ConditionalCustomAttribute13 |
Optional |
Microsoft.Exchange.Data.MultiValuedProperty |
The ConditionalCustomAttribute1 to
ConditionalCustomAttribute15 parameters specify filters for
recipients' custom attributes. For example, if you set the
ConditionalCustomAttribute1 value to |
ConditionalCustomAttribute14 |
Optional |
Microsoft.Exchange.Data.MultiValuedProperty |
The ConditionalCustomAttribute1 to
ConditionalCustomAttribute15 parameters specify filters for
recipients' custom attributes. For example, if you set the
ConditionalCustomAttribute1 value to |
ConditionalCustomAttribute15 |
Optional |
Microsoft.Exchange.Data.MultiValuedProperty |
The ConditionalCustomAttribute1 to
ConditionalCustomAttribute15 parameters specify filters for
recipients' custom attributes. For example, if you set the
ConditionalCustomAttribute1 value to |
ConditionalCustomAttribute2 |
Optional |
Microsoft.Exchange.Data.MultiValuedProperty |
The ConditionalCustomAttribute1 to
ConditionalCustomAttribute15 parameters specify filters for
recipients' custom attributes. For example, if you set the
ConditionalCustomAttribute1 value to |
ConditionalCustomAttribute3 |
Optional |
Microsoft.Exchange.Data.MultiValuedProperty |
The ConditionalCustomAttribute1 to
ConditionalCustomAttribute15 parameters specify filters for
recipients' custom attributes. For example, if you set the
ConditionalCustomAttribute1 value to |
ConditionalCustomAttribute4 |
Optional |
Microsoft.Exchange.Data.MultiValuedProperty |
The ConditionalCustomAttribute1 to
ConditionalCustomAttribute15 parameters specify filters for
recipients' custom attributes. For example, if you set the
ConditionalCustomAttribute1 value to |
ConditionalCustomAttribute5 |
Optional |
Microsoft.Exchange.Data.MultiValuedProperty |
The ConditionalCustomAttribute1 to
ConditionalCustomAttribute15 parameters specify filters for
recipients' custom attributes. For example, if you set the
ConditionalCustomAttribute1 value to |
ConditionalCustomAttribute6 |
Optional |
Microsoft.Exchange.Data.MultiValuedProperty |
The ConditionalCustomAttribute1 to
ConditionalCustomAttribute15 parameters specify filters for
recipients' custom attributes. For example, if you set the
ConditionalCustomAttribute1 value to |
ConditionalCustomAttribute7 |
Optional |
Microsoft.Exchange.Data.MultiValuedProperty |
The ConditionalCustomAttribute1 to
ConditionalCustomAttribute15 parameters specify filters for
recipients' custom attributes. For example, if you set the
ConditionalCustomAttribute1 value to |
ConditionalCustomAttribute8 |
Optional |
Microsoft.Exchange.Data.MultiValuedProperty |
The ConditionalCustomAttribute1 to
ConditionalCustomAttribute15 parameters specify filters for
recipients' custom attributes. For example, if you set the
ConditionalCustomAttribute1 value to |
ConditionalCustomAttribute9 |
Optional |
Microsoft.Exchange.Data.MultiValuedProperty |
The ConditionalCustomAttribute1 to
ConditionalCustomAttribute15 parameters specify filters for
recipients' custom attributes. For example, if you set the
ConditionalCustomAttribute1 value to |
ConditionalDepartment |
Optional |
Microsoft.Exchange.Data.MultiValuedProperty |
The ConditionalDepartment parameter is a filter to specify a department. All recipients with a department attribute that matches the value that you input for this parameter are included in the address list. You can use multiple values as a comma-delimited list. You can't use this parameter if you use the RecipientFilter parameter. You must use either the RecipientFilter parameter or one of these filter parameters:
|
ConditionalStateOrProvince |
Optional |
Microsoft.Exchange.Data.MultiValuedProperty |
The ConditionalStateOrProvince parameter is a filter to specify a state or province. All recipients with a ConditionalStateOrProvince attribute that matches the value that you input for this parameter are included in the address list. You can use multiple values as a comma-delimited list. You can't use this parameter if you use the RecipientFilter parameter. You must use either the RecipientFilter parameter or one of these filter parameters:
|
Confirm |
Optional |
System.Management.Automation.SwitchParameter |
The Confirm switch 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 switch. |
Container |
Optional |
Microsoft.Exchange.Configuration.Tasks.AddressListIdParameter |
The Container parameter specifies the identity of the parent address list where this new address list is created. If no parent address list is specified, the address list is created under the root All Address Lists. |
DisplayName |
Optional |
System.String |
The DisplayName parameter specifies the display name of the address list. If no display name is provided, the name of the address list is also the display name. |
DomainController |
Optional |
Microsoft.Exchange.Data.Fqdn |
The DomainController parameter specifies the fully qualified domain name (FQDN) of the domain controller that writes this configuration change to Active Directory. |
IncludedRecipients |
Optional |
Microsoft.Exchange.Data.Directory.Recipient.WellKnownRecipientType |
The IncludedRecipients parameter is a filter to specify the type of recipient to include in the address list. You can use one or more of the following types:
You can't use this parameter if you use the RecipientFilter parameter. You must use either the RecipientFilter parameter or one of these filter parameters:
|
Organization |
Optional |
Microsoft.Exchange.Configuration.Tasks.OrganizationIdParameter |
This parameter is reserved for internal Microsoft use. |
RecipientContainer |
Optional |
Microsoft.Exchange.Configuration.Tasks.OrganizationalUnitIdParameter |
The RecipientContainer parameter filters the recipients used to build the dynamic distribution group based on their location in Active Directory. The value of the RecipientContainer parameter can be the canonical name of an organizational unit (OU) or a domain. If a value for RecipientContainer isn't specified, the default search filter is the location of the dynamic distribution group in Active Directory. |
RecipientFilter |
Optional |
System.String |
The RecipientFilter parameter specifies a filter for recipients to include in the address list. You can't use this parameter if you use any of the following filter parameters:
You must use either this parameter or one of the preceding filter parameters. |
WhatIf |
Optional |
System.Management.Automation.SwitchParameter |
The WhatIf switch instructs the command to simulate the actions that it would take on the object. By using the WhatIf switch, 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 switch. |
Input Types
To see the input types that this cmdlet accepts, see Cmdlet Input and Output Types. If the Input Type field for a cmdlet is blank, the cmdlet doesn’t accept input data.
Return Types
To see the return types, which are also known as output types, that this cmdlet accepts, see Cmdlet Input and Output Types. If the Output Type field is blank, the cmdlet doesn’t return data.