Commands › Exchange Online

New-GlobalAddressList

Exchange Online ExchangeOnlineManagement New-*

Create a global address list (GAL). 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-GlobalAddressList — 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-GlobalAddressList
$before | Format-List

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

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

Syntax — 2 parameter sets

PrecannedFilter

New-GlobalAddressList [-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]
 [-DomainController <Fqdn>]
 [-RecipientContainer <OrganizationalUnitIdParameter>]
 [-WhatIf]
 [<CommonParameters>]

CustomFilter

New-GlobalAddressList [-Name] <String> -RecipientFilter <String>
 [-Confirm]
 [-DomainController <Fqdn>]
 [-RecipientContainer <OrganizationalUnitIdParameter>]
 [-WhatIf]
 [<CommonParameters>]

Parameters (25)

ParameterTypeRequiredWhat it controls
-Name String yes The Name parameter specifies a unique name for the global address list. The maximum length is 64 characters. If the value contains spaces, enclose the value in quotation marks (").
-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.
-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.