How to Set the OfflineAddressBook Property for All Mailboxes on Exchange 2016 and Higher
Overview
Starting with Exchange 2010, Atria does not automatically assign the OfflineAddressBook property to user mailboxes. However, from Exchange 2016 onward, setting this property is required for Outlook to display the correct OAB details.
The following PowerShell script ensures that the OfflineAddressBook property is properly configured on all user mailboxes. This process typically only needs to be run once.
Process
Execute the following PowerShell Code from within the Exchange Management Shell:
foreach ($oab in Get-OfflineAddressBook | where {$_.isDefault -eq $false}) {
$recipients = @()
foreach ($al in $oab.AddressLists) {
if ($al.DistinguishedName -like '*CN=All Address Lists,*') {
$filter = get-addresslist $al.ObjectGuid.guid | select -expand RecipientFilter
} else {
$filter = get-GlobalAddresslist $al.ObjectGuid.guid | select -expand RecipientFilter
}
$recipients += Get-Recipient -RecipientPreviewFilter $filter
}
foreach ($recipient in $recipients | Where {$_.RecipientType -eq 'UserMailbox'} | select -unique) {
$recipient | set-mailbox -OfflineAddressBook $oab.name
}
}