Commands › Exchange Online

New-AddressList

Exchange Online ExchangeOnlineManagement New-*

Create address lists and apply them to recipients. In Exchange Online, To use this cmdlet, you need to add the Address Lists role to a role group (for example, to the Organization Management role group). For more information, see Add a role to a role group.

Quick start script

# New-AddressList — 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-AddressList
$before | Format-List

# 3. Make the change (dry run first)
New-AddressList -Name <String> -IncludedRecipients <WellKnownRecipientType> -RecipientFilter <String> -WhatIf
New-AddressList -Name <String> -IncludedRecipients <WellKnownRecipientType> -RecipientFilter <String>

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

Syntax — 2 parameter sets

PrecannedFilter

New-AddressList [-Name] <String> -IncludedRecipients <WellKnownRecipientType>
 [-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]
 [-Container <AddressListIdParameter>]
 [-DisplayName <String>]
 [-DomainController <Fqdn>]
 [-RecipientContainer <OrganizationalUnitIdParameter>]
 [-WhatIf]
 [<CommonParameters>]

CustomFilter

New-AddressList [-Name] <String> -RecipientFilter <String>
 [-Confirm]
 [-Container <AddressListIdParameter>]
 [-DisplayName <String>]
 [-DomainController <Fqdn>]
 [-RecipientContainer <OrganizationalUnitIdParameter>]
 [-WhatIf]
 [<CommonParameters>]

Parameters (27)

ParameterTypeRequiredWhat it controls
-Name String yes The Name parameter specifies the unique name for the new address list. The maximum length is 64 characters, and it can't include a carriage return or a backslash (\\). If the value contains spaces, enclose the value...
-IncludedRecipients WellKnownRecipientType yes The IncludedRecipients parameter specifies a precanned filter that's based on the recipient type. Valid values are:
-RecipientFilter String yes 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...
-ConditionalCompany MultiValuedProperty The ConditionalCompany parameter specifies a precanned filter that's based on the value of the recipient's Company property. You can specify multiple values separated by commas.
-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.
-Container AddressListIdParameter The Container parameter specifies where to create the address list. Valid input for this parameter is under the root "\\" (also known as All Address Lists) or under an existing address list. You can use any value...
-DisplayName String The DisplayName parameter specifies the display name of the address list. The display name is visible in the Exchange admin center and Outlook. The maximum length is 256 characters. If the value contains spaces,...
-DomainController Fqdn This parameter is available only in on-premises Exchange.
-RecipientContainer OrganizationalUnitIdParameter This parameter is available only in on-premises Exchange.
-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.

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