Commands › Exchange Online

New-OfflineAddressBook

Exchange Online ExchangeOnlineManagement New-*

Create offline address books (OABs). 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-OfflineAddressBook — 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-OfflineAddressBook
$before | Format-List

# 3. Make the change (dry run first)
New-OfflineAddressBook -Name <String> -AddressLists <AddressBookBaseIdParameter[]> -WhatIf
New-OfflineAddressBook -Name <String> -AddressLists <AddressBookBaseIdParameter[]>

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

Syntax

New-OfflineAddressBook [-Name] <String> -AddressLists <AddressBookBaseIdParameter[]>
 [-Confirm]
 [-DiffRetentionPeriod <Unlimited>]
 [-DomainController <Fqdn>]
 [-GeneratingMailbox <MailboxIdParameter>]
 [-GlobalWebDistributionEnabled <Boolean>]
 [-IsDefault <Boolean>]
 [-PublicFolderDatabase <DatabaseIdParameter>]
 [-PublicFolderDistributionEnabled <Boolean>]
 [-Schedule <Schedule>]
 [-Server <ServerIdParameter>]
 [-ShadowMailboxDistributionEnabled <Boolean>]
 [-SkipPublicFolderInitialization]
 [-Versions <MultiValuedProperty>]
 [-VirtualDirectories <VirtualDirectoryIdParameter[]>]
 [-WhatIf]
 [<CommonParameters>]

Parameters (17)

ParameterTypeRequiredWhat it controls
-Name String yes The Name parameter specifies the unique name of the OAB. The maximum length is 64 characters. If the value contains spaces, enclose the value in quotation marks.
-AddressLists AddressBookBaseIdParameter[] yes The AddressLists parameter specifies the address lists or global address lists that are included in the OAB. You can use any value that uniquely identifies the address list. For example:
-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.
-DiffRetentionPeriod Unlimited The DiffRetentionPeriod parameter specifies the number of days that the OAB difference files are stored on the server. Valid values are integers from 7 to 1825, or the value unlimited. The default value is 30.
-DomainController Fqdn This parameter is available only in on-premises Exchange.
-GeneratingMailbox MailboxIdParameter This parameter is available only in on-premises Exchange.
-GlobalWebDistributionEnabled Boolean This parameter is available only in on-premises Exchange.
-IsDefault Boolean The IsDefault parameter specifies whether the OAB is used by all mailboxes and mailbox databases that don't have an OAB specified. Valid values are:
-PublicFolderDatabase DatabaseIdParameter The PublicFolderDatabase parameter specifies the public folder database that's used to distribute the OAB. You can use any value that uniquely identifies the database. For example:
-PublicFolderDistributionEnabled Boolean The PublicFolderDistributionEnabled parameter specifies whether the OAB is distributed via public folders. If the value of the PublicFolderDistributionEnabled parameter is $true, the OAB is distributed via public folders.
-Schedule Schedule The Schedule parameter specifies the interval for generating the OAB in Exchange 2010 or earlier.
-Server ServerIdParameter The Server parameter specifies the Exchange server where you want to run this command. You can use any value that uniquely identifies the server. For example:
-ShadowMailboxDistributionEnabled Boolean This parameter is available only in on-premises Exchange.
-SkipPublicFolderInitialization SwitchParameter The SkipPublicFolderInitialization switch specifies whether to skip the immediate creation of the OAB public folders if you're creating an OAB that uses public folder distribution. You don't need to specify a value...
-Versions MultiValuedProperty The Versions parameter specifies the OAB versions that are generated for client download. Valid values are:
-VirtualDirectories VirtualDirectoryIdParameter[] 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.