New-OfflineAddressBook

This cmdlet is available in on-premises Exchange and in the cloud-based service. Some parameters and settings may be exclusive to one environment or the other. Use the New-OfflineAddressBook cmdlet to create offline address books (OABs). By default in Exchange Online, the Address List role isn't assigned to any role groups. To use any cmdlets that require the Address List role, you need to add the role to a role group. For more information, see the "Add a role to a role group" section in the topic, Manage role groups. For information about the parameter sets in the Syntax section below, see Exchange cmdlet syntax (https://technet.microsoft.com/library/bb123552.aspx).

Syntax

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

Description

You need to be assigned permissions before you can run this cmdlet. Although this topic lists all parameters for the cmdlet, you may not have access to some parameters if they're not included in the permissions assigned to you. To find the permissions required to run any cmdlet or parameter in your organization, see Find the permissions required to run any Exchange cmdlet (https://technet.microsoft.com/library/mt432940.aspx).

Examples

-------------------------- Example 1 --------------------------

$a = Get-AddressList | Where {$_.Name -Like "*AgencyB*"}; New-OfflineAddressBook -Name "OAB_AgencyB" -Server myserver.contoso.com -AddressLists $a -Schedule "Mon.01:00-Mon.02:00, Wed.01:00-Wed.02:00"

In Exchange Server 2010 and 2013, this example uses two commands to create the OAB named OAB_AgencyB that includes all address lists in which AgencyB is part of the name. By using the settings shown, an OAB is generated by myserver.contoso.com on Mondays and Wednesdays from 01:00 (1 A.M.) to 02:00 (2 A.M.). This example command also creates the default OAB for the organization.

-------------------------- Example 2 --------------------------

New-OfflineAddressBook -Name "Contoso Executives OAB" -AddressLists "Default Global Address List","Contoso Executives Address List" -GlobalWebDistributionEnabled $true

This example creates a new OAB named Contoso Executives OAB with the following properties:

  • Address lists included in the OAB: Default Global Address List and Contoso Executives Address List

  • All OAB virtual directories in the organization can accept requests to download the OAB.

The organization mailbox that's responsible for generating the OAB is SystemMailbox{bb558c35-97f1-4cb9-8ff7-d53741dc928c} (we didn't use the GeneratingMailbox parameter to specify a different organization mailbox).

The OAB isn't used by mailboxes and mailbox databases that don't have an OAB specified (we didn't use the IsDefault parameter with the value $true).

-------------------------- Example 3 --------------------------

New-OfflineAddressBook -Name "New OAB" -AddressLists "\Default Global Address List" -Server SERVER01 -VirtualDirectories "SERVER01\OAB (Default Web Site)"

In Exchange Server 2010, this example creates the OAB New OAB that uses Web-based distribution for Microsoft Office Outlook 2007 or later clients on SERVER01 by using the default virtual directory.

-------------------------- Example 4 --------------------------

New-OfflineAddressBook -Name "Legacy OAB" -AddressLists "\Default Global Address List" -Server SERVER01 -PublicFolderDatabase "PFDatabase" -PublicFolderDistributionEnabled $true -Versions Version1,Version2

In Exchange Server 2010, this example creates the OAB Legacy OAB that uses public folder distribution for Outlook 2003 Service Pack 1 (SP1) and Outlook 98 Service Pack 2 (SP2) clients on SERVER01.

If you configure OABs to use public folder distribution, but your organization doesn't have any public folder infrastructure, an error will be returned. For more information, see Managing Public Folders.

Required Parameters

-AddressLists

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:

  • Name

  • Distinguished name (DN)

  • GUID

To enter multiple values, use the following syntax: <value1>,<value2>,...<valueX>. If the values contain spaces or otherwise require quotation marks, use the following syntax: "<value1>","<value2>",..."<valueX>".

You can find the identify values of address lists and global address lists by using the Get-AddressList and Get-GlobalAddressList cmdlets.

Type:AddressBookBaseIdParameter[]
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Exchange Server 2010, Exchange Server 2013, Exchange Server 2016, Exchange Online
-Name

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.

Type:String
Position:1
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Exchange Server 2010, Exchange Server 2013, Exchange Server 2016, Exchange Online

Optional Parameters

-Confirm

The Confirm switch specifies whether to show or hide the confirmation prompt. How this switch affects the cmdlet depends on if the cmdlet requires confirmation before proceeding.

  • Destructive cmdlets (for example, Remove-* cmdlets) have a built-in pause that forces you to acknowledge the command before proceeding. For these cmdlets, you can skip the confirmation prompt by using this exact syntax: -Confirm:$false.

  • Most other cmdlets (for example, New-* and Set-* cmdlets) don't have a built-in pause. For these cmdlets, specifying the Confirm switch without a value introduces a pause that forces you acknowledge the command before proceeding.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Exchange Server 2010, Exchange Server 2013, Exchange Server 2016, Exchange Online
-DiffRetentionPeriod

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.

Type:Unlimited
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Exchange Server 2010, Exchange Server 2013, Exchange Server 2016, Exchange Online
-DomainController

This parameter is available only in on-premises Exchange.

The DomainController parameter specifies the domain controller that's used by this cmdlet to read data from or write data to Active Directory. You identify the domain controller by its fully qualified domain name (FQDN). For example, dc01.contoso.com.

Type:Fqdn
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Exchange Server 2010, Exchange Server 2013, Exchange Server 2016
-GeneratingMailbox

This parameter is available only in on-premises Exchange.

The GeneratingMailbox parameter specifies the arbitration mailbox where the OAB is generated. Specifically, the arbitration mailbox must contain the OrganizationCapabilityOABGen value for the PersistedCapability property. An arbitration mailbox with this capability is also known as an organization mailbox. You can use any value that uniquely identifies the mailbox.

For example:

  • Name

  • Display name

  • Alias

  • Distinguished name (DN)

  • Canonical DN

  • <domain name>\<account name>

  • Email address

  • GUID

  • LegacyExchangeDN

  • SamAccountName

  • User ID or user principal name (UPN)

The default value for this parameter is the organization mailbox named SystemMailbox{bb558c35-97f1-4cb9-8ff7-d53741dc928c}.

A single organization mailbox can generate multiple OABs (you can use the same value for this parameter in the settings of multiple OABs), but in Exchange 2013 CU5 or later, an OAB can only be generated by a single organization mailbox (this parameter doesn't accept multiple values). To have a read only copy of the OAB (also known as a shadow copy) available in other organization mailboxes, use the ShadowMailboxDistributionEnabled parameter.

Type:MailboxIdParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Exchange Server 2013, Exchange Server 2016, Exchange Online
-GlobalWebDistributionEnabled

This parameter is available only in on-premises Exchange.

The GlobalWebDistributionEnabled parameter specifies whether all OAB virtual directories in the organization can accept requests to download the OAB. These locations are advertised by the Autodiscover service. Valid values are:

  • $true: Any OAB virtual directory in the organization can accept requests to download the OAB. You can't use this setting with the VirtualDirectories parameter.

  • $false: Only the OAB virtual directories that are specified by the VirtualDirectories parameter accept requests to download the OAB. This is the default value.

In Exchange 2013 CU7 or later, we recommend that you use the value $true for this parameter. The Client Access services on any Mailbox server can proxy incoming OAB download requests to the correct location.

Type:$true | $false
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Exchange Server 2010, Exchange Server 2013, Exchange Server 2016, Exchange Online
-IsDefault

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:

  • $true: The OAB is the default OAB.

  • $false: The OAB is isn't the default OAB. This is the default value.

Type:$true | $false
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Exchange Server 2010, Exchange Server 2013, Exchange Server 2016, Exchange Online
-PublicFolderDatabase

The PublicFolderDatabase parameter specifies the identity of the public folder database being used to distribute the OAB. To use this parameter, the PublicFolderDistributionEnabled parameter must be set to $true.

Type:DatabaseIdParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Exchange Server 2010
-PublicFolderDistributionEnabled

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.

Type:$true | $false
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Exchange Server 2010
-Schedule

The Schedule parameter specifies the interval scheduled for generating the new OAB.

The Schedule parameter takes the following format and must include a range: Weekday.Hour:Minute[AM/PM]-Weekday.Hour:Minute[AM/PM].

Type:Schedule
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Exchange Server 2010
-Server

The Server parameter specifies which server the new OAB is created on.

Type:ServerIdParameter
Position:Named
Default value:None
Accept pipeline input:True
Accept wildcard characters:False
Applies to:Exchange Server 2010
-ShadowMailboxDistributionEnabled

This parameter is available only in on-premises Exchange.

The ShadowMailboxDistributionEnabled parameter specifies whether a read only copy of the OAB (also known as a shadow copy) is distributed to all other OAB generation mailboxes (also known as organization mailboxes). This allows additional Mailbox servers to be endpoints for requests to download the OAB, which can help prevent users from downloading the OAB across slow WAN links. Valid values are:

  • $true: The OAB is distributed to all other organization mailboxes.

  • $false: The OAB is isn't distributed to other organization mailboxes. This is the default value.

The value of this parameter is only meaningful if you have multiple organization mailboxes, and is only beneficial in Exchange organizations that have multiple Active Directory sites.

Type:$true | $false
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Exchange Server 2013, Exchange Server 2016, Exchange Online
-SkipPublicFolderInitialization

The SkipPublicFolderInitialization parameter specifies whether to skip the immediate creation of the OAB public folders if you're creating an OAB that uses public folder distribution. The OAB isn't available for download until the next site folder maintenance cycle has completed. You don't have to specify a value with the SkipPublicFolderInitialization parameter. Omitting this parameter may cause the task to pause while it contacts the responsible public folder server to create the necessary public folders. If the server is presently unreachable, or is otherwise costly to contact, the pause could be significant.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Exchange Server 2010
-Versions

The Versions parameter specifies what version of OAB to generate. The allowed values are:

  • Version1

  • Version2

  • Version3

  • Version4

Type:MultiValuedProperty
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Exchange Server 2010
-VirtualDirectories

This parameter is available only in on-premises Exchange.

The VirtualDirectories parameter specifies the OAB virtual directories that accept requests to download the OAB. These locations are advertised in the Autodiscover service.

You can use any value that uniquely identifies the virtual directory. For example:

  • Name or <Server>\Name

  • Distinguished name (DN)

  • GUID

The Name value uses the syntax "<VirtualDirectoryName> (<WebsiteName>)" from the properties of the virtual directory. You can specify the wildcard character (*) instead of the default website by using the syntax <VirtualDirectoryName>*.

The default value of this parameter is the Client Access services (frontend) and backend OAB virtual directories on the Mailbox server that holds the OAB generation mailbox (the GeneratingMailbox parameter or SystemMailbox{bb558c35-97f1-4cb9-8ff7-d53741dc928c}). For example, Mailbox01\OAB (Default Web Site),Mailbox01\OAB (Exchange Back End.

To use this parameter, the value of the GlobalWebDistributionEnabled parameter must be $false.

In Exchange 2013 CU7 or later, we recommend that you set the GlobalWebDistributionEnabled parameter to $true, because the Client Access services on any Mailbox server can proxy incoming OAB download requests to the correct location.

Type:VirtualDirectoryIdParameter[]
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Exchange Server 2010, Exchange Server 2013, Exchange Server 2016, Exchange Online
-WhatIf

The WhatIf switch simulates the actions of the command. You can use this switch to view the changes that would occur without actually applying those changes. You don't need to specify a value with this switch.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Exchange Server 2010, Exchange Server 2013, Exchange Server 2016, Exchange Online

Inputs

To see the input types that this cmdlet accepts, see Cmdlet Input and Output Types (https://go.microsoft.com/fwlink/p/?LinkId=616387). If the Input Type field for a cmdlet is blank, the cmdlet doesn't accept input data.

Outputs

To see the return types, which are also known as output types, that this cmdlet accepts, see Cmdlet Input and Output Types (https://go.microsoft.com/fwlink/p/?LinkId=616387). If the Output Type field is blank, the cmdlet doesn't return data.