How to Recreate Exchange 2010 Offline Address Book on a Higher Exchange Version
Overview
When deploying a newer version of Exchange, one of the components that must be migrated is the Offline Address Book (OAB). Due to changes in how OABs are created and stored in newer Exchange versions, Exchange 2010 OABs must be recreated rather than migrated.
In Atria, each customer is assigned their own OAB using a specific naming standard. To recreate these OABs in the new version, the 2010 OAB must first be renamed so a new one can assume the original name.
This guide explains how to use the provided script to recreate OABs in your new Exchange environment.
Running the Script
Requirements
-
Atria Account with API Permission
The script queries the CortexAPI to retrieve customer details. -
CortexAPI URL
Default URLs:https://<WebServer>/CortexAPI/default.aspx
https://atriaweb/CortexAPI/default.aspx
Check your Web Server IIS binding for your specific URL.
Atria CortexAPI Guide
- Run the commands on Your Latest Exchange Server
This ensures the new OAB inherits the latest version.
Use either Exchange Management Shell or PowerShell.- If using standard PowerShell, don’t forget to load the Exchange Management snap-in.
Actions
Rename
This action searches Exchange for an OAB with:
- ExchangeVersion like
0.10*
- Name like
"$customershortname Offline Address List"
Get-OfflineAddressBook | Where-Object { $_.ExchangeVersion -like "0.10*" -and $_.Name -like "$customershortname Offline Address List" }
If found, the OAB is renamed by appending 2010
to it.
Example:
ABC Offline Address List
→ ABC Offline Address List 2010
Restore
Reverts the changes performed by the Rename
and Migrate
actions.
Migrate
Steps:
-
Search for OAB
$legacy_oab = Get-OfflineAddressBook | Where-Object { $_.ExchangeVersion -like "0.10*" -and $_.Name -like "$customershortname Offline Address List" }
-
Retrieve Address Lists
$addressLists = Get-OfflineAddressBook -Identity $legacy_oab | Select AddressLists
-
Create New OAB
New-OfflineAddress -Name "$customershortname Offline Address List" -AddressLists $addressLists -GlobalWebDistributionEnabled $true -VirtualDirectories $null
-
Assign New OAB to Address Book Policy
Set-AddressBookPolicy -Identity "$customershortname Address Book Policy" -OfflineAddressBook "\$customershortname Offline Address List"
-
Assign New OAB to Mailboxes
Set-Mailbox -Identity $mailbox -OfflineAddressBook "$customershortname Offline Address List"
- The script queries customer-specific mailboxes using:
Get-Mailbox -Filter "CustomAttribute15 -eq $customerid"
Delete 2010 OAB's
Searches for renamed 2010 OABs and deletes them.
$modified_oab = Get-OfflineAddressBook | Where-Object { $_.ExchangeVersion -like "0.10*" -and $_.Name -like "$customershortname Offline Address List 2010" }
Remove-OfflineAddressBook -Identity $modified_oab -Confirm:$false
Additional Parameters
-useSSL
Use SSL when connecting to CortexAPI.
-CustomerShortName
Target a specific customer using their code/shortname.
-Location
Filter CortexAPI query to a specific location.
By default, all customers are queried, including those in remote Active Directories. This parameter improves performance by narrowing the scope.
-EnableLog
Creates a log file during script execution.
-CreateMigratedList
Works with the Migrate
action.
Creates a migration log to track which customers have already been processed.
Re-running Migrate
will skip customers in this list unless the entry is deleted.
Examples
Before running the script:
$url = "http://atriaweb/CortexAPI/default.aspx"
$credentials = Get-Credential
- Use Atria credentials with API permission.
Migrate
This example processes all customers provisioned with Hosted Exchange:
- Queries CortexAPI
- Searches for 2010 OAB
- Creates a new one
- Reassigns Address Book Policy
- Updates mailboxes

After migration, the old OAB remains (renamed), allowing use of Restore
:

Restore
Use -CustomerShortName
to reverse changes for one customer:

Location
Use this parameter to limit scope by location.


Without it, remote location queries will fail to find 2010 OABs:

EnableLog and CreateMigratedList
These parameters log processed customers:


