Creating and Configuring a Custom Offline Address book with Web-Based Distribution in Exchange 2010 Using PowerShell

Comments 0

Share to social media

The offline address-book and Web-based distribution point

The offline address-book (OAB) is a copy of the Exchange address book that the user can download via their Outlook client. It is mainly used to allow access to the address book when the user is disconnected from the network or is in cached mode.

The OAB has evolved somewhat, and is now in OAB Version 4. This version was introduced in Exchange 2003 SP2 and is still used by Exchange 2007 and Exchange 2010.

Microsoft introduced the concept of a Web-based distribution point for OABs in Exchange 2007. It has various advantages over the previous system of public folder distribution, even though the previous system is still supported. Web-based distribution point can be easily created and configured using Exchange management console or Exchange management shell. It’s a more effective way of downloading OAB than from public folder. Web-based distribution supports more clients and consumes less bandwidth. The OAB is downloaded via a virtual directory on the client access server. This virtual directory is created under the default website in IIS with the folder name OAB.

How Outlook downloads the OAB to its client machine

The first Mailbox Server in the Exchange organization is identified by default as the OAB Generation Server (this assignment is often moved to a different server after installation).

The OABGen service running on the mailbox server helps to generate, creates and updates the OAB files. The OABGen service is part of the System Attendant Service. All OAB files generated for web-based distribution will be, by default, located at the path “\Program Files\Microsoft\Exchange Server\V14\ExchangeOAB” on the server. OABGen communicates with the Active Directory, and generates the address book with all the mailboxes, contacts and other exchange resources in the Exchange organization into the default OAB. There can be only one default OAB in the Exchange organization. OABGen generates address book for all the OAB defined in the organization. You can have multiple OAB defined with specific configuration based on the requirement. The OAB in the mailbox server are written to a compressed file with the extension .LZX.

OAB files are generated in Exchange 2010 Mailbox servers, but Outlook does not connect directly to the mailbox servers. Instead, the Client Access Server role is used with web-based distribution. On every server running the Client Access Server Role, a virtual directory called OAB, inside IIS under the Default website. This virtual directory helps in distributing the OAB.

The OAB virtual directory gets the OAB data files from the mailbox server by using Microsoft Exchange File Distribution Service running on the Client access Server. The Microsoft Exchange File Distribution Servers poll the OABGen Server and copies the OAB data from the mailbox servers to the Client Access Server (CAS).  Once the complete OAB data is copied, then it is subsequently kept up to date by synchronization with the CAS server. The synchronization or poll frequency is 8 hours by default, but you can change it if required using PowerShell cmdlet or Exchange console.

Outlook clients use the web https URL of the web distribution point, provided by the autodiscover, to download the OAB into the local computer.

Creating and configuring a new offline address-book for a region

We will now show how to create and configure a new OAB for a particular region, (a region is an AD site). The same configuration steps can be repeated for different regions/AD sites according to your particular requirements in order to create multiple OABs. The main objective is to avoid having more than one Client Access Server in each region/AD site pointing to one OAB generating server to get the updates. We can instead create additional OAB generating servers, one in each region/AD site, and configure web-distribution servers that point to the OAB generating server in the local region/AD site.

In the example configuration in this chart below, we have an Active Directory (AD) site “India” and will be creating a new OAB, towards which we’ll point all the web distribution points.

S1 Server Name Role AD Site
1 KEXCHDC Domain Controller India
2 KEXCHHC Hub transport server and Client access server India
3 KEXCHMHC01 Mailbox Server India

We will:

  • Create a new Offline Address Book and configure a web distribution point
  • Update the offline address book
  • Configure mailbox databases with the new OAB
  • Download the OAB and verification from Outlook client

Creating a new Offline Address Book and configuring a web distribution point

We can create and manage offline address books (OAB) using PowerShell cmdlets. To create a new Offline address book, use the cmdlet New-Offlineaddressbook. In Figure 1, the cmdlet creates a new OAB “India – OAB” on a Mailbox server “KEXCHMHC01â³ and it also adds default global address list into the OAB. You’ll see the execution result of NewOfflineaddressbook cmdlet. Its throws the warning “OAB needs further configuration and users will not be able to download offline address book”. At the moment OAB is not configured for web distribution or public folder distribution, so this can be ignored at the moment.

1440-image001.jpg

Figure 1. Create new OAB “India – OAB”

Now that we’ve created a new OAB “India – OAB”, let’s configure it with web-distribution points. Before we configure it, we need to get the list of all the web distribution servers for India region/AD site. In the code below, the cmdlet queries for a list of all the Client Access(web distribution servers) in the India AD site and assigns the result to the variable $IndiaCasServers. Figure 2 has the execution summary of the same:

1440-image002.jpg

Figure 2. Get the list of all the Web distribution servers in India AD site

Now we create the list of the OAB virtual directory from the CAS server list $IndiaCasservers into the array $result:

1440-image003.jpg

Figure 3. Get the list of OAB Virtual directory for all the CAS Servers

It’s now time to configure the CAS server’s OAB Virtual directories with the Offline address book. This will also enable to OAB for web distribution. Below is an example of using the Set-OfflineAddressbook cmdlet and Figure 4 shows the execution result.

1440-image004.jpg

Figure 4. Configures offline address book with the CAS OAB virtual directories

Let’s check out the properties of the new offline address book and you should be able to see WebdistributionEnabled is set to True and Virtualdirectories is also configured with the CAS server OAB virtual directories, as in Figure 5. The results marked with red shows the values of these.

1440-image005.jpg

Figure 5. OAB “India-OAB” Properties details

Updating the offline address book

Updating the offline address book is the process to force the update the offline address book immediately. As we just created a new OAB, it has to be updated with all the recipients in the organization. The Update process communicates with the Active directory and gets all the details of contacts. It is normally scheduled to run once per day, and you can change the schedule depending on the size of the OAB and organization requirement.

Below is the PowerShell cmdlet to update “India – OAB” immediately and figure 6. shows the execution details of the same.

1440-image006.jpg

Figure 6. Updating offline address book

The new OAB “India – OAB” has updated itself with the latest information and this information has to be replicated to all the CAS Servers. To force update of the CAS server we need to use the Get-ExchangeServer cmdlet which executes the update-file distribution service on all the CAS servers in the India region/AD site.

1440-image007.jpg

Figure 7. Updating File distribution service

Configure the Mailbox Database with new OAB

As we have successfully created, configured and updated the new OAB. It’s time to configure the mailbox databases with the new OAB. With the below cmdlet we get all the Exchange database in the India region/AD site and configure with the new OAB “India – OAB” and figure 8. shows the execution summary:

1440-image008.jpg

Figure 8. Updating Exchange database with new mailbox database

Downloading OAB and verification

Let’s use MS Outlook to see if we can download the new OAB and, at the same time, verify the OAB Distribution point URL.

Access the user mailbox using outlook and click on ‘send/receive’ from the menu and click on ‘Download Address book’. Make sure you are accessing the mailbox that is located in the database which is configured with the OAB (above). Figure 9 shows the screenshot.

1440-image009.jpg

Figure 9. Process to download the OAB using Outlook

You should be able to see MS Outlook downloading the OAB into the local computer.

1440-image010.jpg

Figure 10. Downloading OAB files into local computer

Outlook OAB file are stored in the default location “\Users\<username>\AppData\Local\Microsoft\Outlook\Offline Address Books” with the extension .oab.

1440-image011.jpg

Figure 11. OAB file in the user computer

We can always find the path that MS Outlook uses to connect to the CAS and OAL. Right-click the Outlook icon in the System Tray and select ‘Test E-mail AutoConfiguration‘, then click on Test button on the Test E-mail Auto Configuration as shown in the figure 12. OAB URL is the path in the OAB distribution point details.

1440-image012.jpg

Figure 12. Test E-mail Auto configuration execution result

With this we have successfully created and configured a new OAB for a particular region/AD site. If you need OAB for several regions/AD sites, then the same configuration can be replicated with the new name and new set of CAS server from that region/AD site.

Sometimes, the OAB may cause problems and it may not update itself. The most basic troubleshooting step is to rerun the Update-Offlineaddressbook PowerShell cmdlet, restart the file distribution service and try to force the AD replication. You may also try to move OAB to the new server if the server performance is very bad. Move-Offlineaddressbook cmdlet helps to move the OAB to the new Server. I hope you like this article and it helps you in the real time scenario to configuring multiple OAB for various regions.

About the author

Krishna Kumar

See Profile

Krishna Kumar R is from Bangalore - the Silicon city of India - and is working in the Messaging Engineering Team of a leading international Financial Organization. He's been in the technology industry for 8 Years, and in that time has earned himself a Masters degree in Information Technology (Msc IT) and is a Microsoft Certified Technology specialist. He specializes in Exchange, Powershell and VB Script, and is a strong believer in the values of Automation and lateral thinking. Always keen to keep up-to-date with the latest technology, Krishna also maintains a personal blog at smtpport25.wordpress.com, and participates in Tech talks on Exchange and Powershell, as well as contributing in Technical Forums.

Krishna Kumar's contributions