Wednesday, April 27, 2016

Managing OAB in Exchange Server 2013

The Exchange team blog article OAB in Exchange Server 2013 introduced the new Offline Address Book (OAB) generation and distribution architecture in Exchange Server 2013. Take a few moments to visit the article if you haven’t seen it yet or re-visit it for a quick refresher.
The OAB management and administration is different in Exchange 2013 because of architecture changes. Additionally, the new Exchange Admin Center does not currently have options for managing OABs. This means that, at this time, you will need to use Exchange Management Shell for OAB-related tasks.
This article takes you through commonly performed tasks in OAB administration and has a couple of real life scenarios to help understand the tasks better.
Note: If you are in multi-forest Active Directory domain environment, make sure the Shell session has ViewEntireForest is enabled, else some of the commands in the article won’t return any output.
Command to enable ViewEntireForest:
Set-ADServerSettings -ViewEntireForest $true


Source :- http://blogs.technet.com/b/exchange/archive/2013/01/14/managing-oab-in-exchange-server-2013.aspx

Creating a new OAB

Creating a new OAB in Exchange 2013 no longer uses the -Server parameter. In order to create a new OAB, you should only specify the address lists to be required.
The following example creates OAB for address list named “Global Address List FAB”
New-OfflineAddressBook -Name OAB-FAB -AddressLists "Global Address List FAB"

Identify the OAB generation server(s)

The arbitration mailboxes in Exchange Server 2013 are assigned certain “Persisted capability” that defines the purpose/function of the arbitration mailbox.
An arbitration mailbox with Persisted Capability “OrganizationCapabilityOABGen” is responsible for OAB generation. We will refer this mailbox as “Organization Mailbox” throughout the article.
Exchange Server 2013 mailbox server hosting the Organization Mailbox will generate all OAB’s defined in the environment.
For a non-DAG environment, use following command to identify the OAB Generation servers:
Get-Mailbox -Arbitration | where {$_.PersistedCapabilities -like "*oab*"} | ft name,servername
image
For a DAG environment, identifying OAB generation server(s) is a two-step process.
Step1: Identify the mailbox database hosting organization mailbox with OAB Gen capability.
Use the following command to list the arbitration mailboxes with persisted capability of OABGen and database on which this mailbox is hosted:
Get-Mailbox -Arbitration | where {$_.PersistedCapabilities -like "*oab*"} | ft name,database
image
Step2: Identify the mailbox server where the database hosting organization mailbox is mounted
Use following command to identify active copy of mailbox database:
Get-MailboxDatabaseCopyStatus db1
image
The server where database status is “mounted” is the current OAB generation server.

Change the OAB generation server

There are two methods of changing the OAB generation server.

Move mailbox

Move the organization mailbox to a mailbox database on a server intended to be designated as OAB Generation server.
Example:
DB1 is a single copy database present on the server Exch1 and hosts the organization mailbox. DB2 is mailbox database present on Exch2.
The following command can be used to move the organization mailbox to DB2 and make Exch2 the OAB generation server.
Get-Mailbox -Arbitration -database db1| where {$_.PersistedCapabilities –like “*oab*”} | New-MoveRequest -TargetDatabase db2
This method is more suited for environments that have single copy of mailbox database hosting the Organization Mailbox.

Activate the mailbox database on another server

This method is suited for environments that have multiple copies of the mailbox database hosting Organization Mailbox.
Example:
DB1 hosts the Organization Mailbox and has copies on servers Exch1 and Exch2. DB1 is currently active on Exch1.
The following command can be used to activate DB1 on Exch2 and therefore make it the OAB generation server:
Move-ActiveMailboxDatabase DB1 -ActivateOnServer Exch2
Note: Review guidelines mentioned in “Placement of Organization Mailbox” below before changing the OAB Generation server.

Creating a new Organization Mailbox

Administrators can create additional Organization Mailboxes for fault tolerance or for serving users in a geographically disbursed Exchange deployment.
Creating a new Organization Mailbox is a two step process:
Step1: Create a new arbitration mailbox
New-Mailbox -Arbitration -Name "OAB Seattle" -Database DB2Seattle -UserPrincipalName oabs@contoso.com –DisplayName “OAB Mailbox for Seattle”
Step2: Enable OABGen capability
Set-Mailbox -Arbitration oabs -OABGen $true
Note: Review guidelines mentioned in “Placement of Organization Mailbox” below before creating additional organization mailboxes.

Changing the OAB Generation Schedule

The OAB Generation till Exchange Server 2010 was based on a “Schedule” set on OAB properties. You might see a “Schedule” defined when viewing properties of Exchange 2013 OAB. But, the Exchange Server 2013 OAB generation does not take place according to the “Schedule” defined on OAB properties:
image
Instead, Exchange Server 2013 OAB Generation takes place according to OABGeneratorWorkCycle and OABGeneratorWorkCycleCheckpoint properties configured at the Mailbox Server.
Example:
image
The values in the above screenshot mean OAB is generated once every day.

Which Mailbox Server processed the OAB download request?

The Exchange Server 2013 CAS role proxies the OAB download request to an appropriate Mailbox role server. The CAS role maintains log of each request it handles in the log files, present in folder %ExchangeInstallPath%\Logging\HttpProxy\OAB\
These log files are an excellent tool to identify which mailbox server the CAS chose to serve the request.
Information of some important fields from the log file:
Field Description
UrlStem Useful to identify the OAB being downloaded and also if this was a full download or incremental download
AuthenticatedUser Name of the User requesting the OAB
AnchorMailbox DN of Organization Mailbox identified as the closest to serve the OAB request
ServerHostName CAS Server Name handling the request
HttpStatus Status code for Proxy action
ProxyAction Action CAS Server performed for the request, it will be mostly “Proxy” for Exchange 2013 OAB
TargetServer Name of Mailbox role server to which request was proxied
The log file can be imported in Excel for better readability.
Example:
image

Forcing the OAB Generation

The Exchange Server 2013 OAB generation can be forced to start immediately by two methods.

Method 1: Update-OfflineAddresBook

Below command will force OAB generation of an OAB named "Default Offline Address Book" across all organization mailboxes.
Update-OfflineAddressBook "default offline address book"
Note: This command initiates an RPC request to each mailbox server hosting an active organization mailbox.

Method 2: Restart the Mailbox Assistant service.

The Microsoft Exchange Mailbox Assistant service on Mailbox Role is responsible for generating OAB. Restarting this service generates all OAB’s defined in the environment on a specific mailbox server, if it’s hosting an active organization mailbox.

Placement of Organization Mailbox

Exchange Server 2013 CAS role proxies the OAB download request to a “nearest” mailbox server hosting an active Organization Mailbox. It can proxy the request in round robin fashion if it finds more than one organization mailbox active in same AD site. Prior to CU5, this will result in frequent full OAB downloads and is therefore, not recommended.
Hence, current guidance is to plan organization mailbox placement such that you will have one organization mailbox active in an AD site. This applies to creating a new organization mailbox as well as to creating copies of mailbox database that hosts an organization mailbox.
Prior to CU5, customers should only deploy a single OAB generation mailbox per Exchange organization to prevent users from accessing different OAB generation mailboxes and requiring a full OAB download.  With CU5 and later, customers can assign OABs to specific OAB generation mailboxes and not have to worry about accidentally triggering full OAB downloads due to accessing different OAB generation mailboxes.  For more information, please see the article, OAB Improvements in Exchange 2013 Cumulative Update 5.

Scenarios

The following scenarios discuss a real life situation to further explain the new OAB management methods.

Scenario 1: Create a new Organization Mailbox

Contoso has Exchange Server 2013 Mailbox & CAS role servers deployed at Dallas and Seattle sites. John, the Exchange Admin for Contoso, analyzes the http proxy log files on CAS servers and finds the OAB download request for Seattle users is going to Dallas servers. On further investigation, John finds he has just one Organization Mailbox present in Dallas, hence OAB download requests of all the users are going to Dallas server.
He decides to create a new Organization Mailbox at Seattle site with following commands:
Step1: Create a new Arbitration Mailbox
New-Mailbox -Arbitration -Name "OAB Seattle" -Database DB2Seattle -UserPrincipalName oabs@contoso.com –DisplayName “OAB Mailbox for Seattle”
Step2: Enable the Arbitration Mailbox with OABGen capability
Set-Mailbox -Arbitration oabs -OABGen $true

Scenario 2: Customize OAB Generation Schedule

Ben is an administrator of Exchange 2013 deployment at Tail Spin Toys. The default OAB generation schedule does not suit them and they want to generate OAB approximately every fourth hour of the day.
Ben will use following command to change properties of the mailbox servers that will be hosting the Organization Mailbox.
Set-MailboxServer Exch1 -OABGeneratorWorkCycle 01.00:00:00 -OABGeneratorWorkCycleCheckpoint 04:00:00
After a couple of days, John analyzes Event ID 17002 in application log and makes sure the OAB is generated every four hours.
image
Hopefully, you find this post useful! Let us know your feedback below!

How offline Address books works in Exchange 2013

What is a Offline Address book ?

For Users where Outlook is in Cache mode, They got to have their Outlook Address book Updated ,when they can access the latest Address book while they go offline.
If Outlook is left running constantly in Cached Exchange Mode, it updates the Offline Address Book automatically about once a day, depending on Address Book updates on the server running Exchange. To initiate these updates manually, do the following:
  1. On the Tools menu, point to Send/Receive, and then click Download Address Book.
  2. Under Information to download, click Full Details or No Details.
So that they can use their updated address book when they are offline.
Earlier Exchange 2010 Version. Outlook Connects to the Client Access Server for MAPI Connectivity.
But From Exchange 2013 Outlook Connects to the Client Access Server
And the requests are proxied to the Mailbox Server
Lets See what is happening in the Background
In my Case all Roles are installed on the Same Server
Offline Address book Generation Server will be a Mailbox Server.
You can find a OAB Virtual Directory in IIS – in the Client Access Server
The Request to the Client Access (OAB Virtual Directory) Proxies the request to the “Exchange Back End” (OAB Virtual Directory) which is a Mailbox Server Containing OAB Files where client downloads the OAB Files
image

Offline Address Book Storage Location
Offline Address book Stores its files to a “System Mailbox” Which is called as “Organizational Mailbox” Where if the database fails the Organization Mailbox can failover using Database availability Group.
where the request from the Client doesn’t fail . It looks the database which owns the Organization Mailbox and OAB files are copied over to the Disk in the appropriate Mailbox Server and it has been to the Client.
Where OAB is no more a single point failure in Exchange 2013
To See which Organizational Mailbox is storing OAB files –
Get-Mailbox –Arbitration | where-Object {$_.PersistedCapabilities –Like "*OabGen*"} | FL Name,Persisted*
You can see – “OrganizationCapabilityOABGen”
image
Then Its Copied over to the disk in the Form of LZX files
Default Location: (Differs if you install Exchange on a Different Drive)
C:\Program Files\Microsoft\Exchange Server\v15\ClientAccess\OAB
image
They will be copied to the disk in the Form of LZX files
image
How to find the Offline Address book url , which is used for OAB Downloads
From Outlook 2007 ,Outlook 2010 and So on , Outlook Downloads Offline Address book using the OAB Url Web-Based (IIS)
Get-OabVirtualDirectory | FL Name,*Url*
You got to Specify the External Url if you are going to use Outlook Anywhere
using Set-OabVirtualDirectory Cmdlet
image
To Find which OAB a User Downloads
Go to a Client Machine
Hold your Ctrl Key and Right Click on the Outlook icon – Click on Test Email AutoConfiguraion
image
Now Using AutoDiscover , You can see the Offline Address book URL as listed below with the Correct Guid Value
image
To Find the GUID Value of the Offline address book
Get-OfflineAddressbook | FT Name,Guid
image
Client will Download their Own OAB depends upon their “Client Settings in Database Properties”
If its not specified – By Default they will download the “Default Offline address book”
image
Or
If they have address book policies applied They would Download their own OAB respective to the Policy
Get-Mailbox "Mailbox Name" | FL Name,AddressBook*
image
How Often Offline Address book Updates itself
** This Updates the Items only on the Mailbox Server – Stores in the “Organization Mailbox” as explained earlier
Get-Offlineaddressbook | FL Name,Schedule
image
Now Depends on the Update Time “Organization Mailbox” will get updated on the Mailbox Server.
**Offline Address book data are saved first only on the Organization Mailbox**  Then Once its got Updated it Serves the latest data to the Clients
How to Force update the Offline Address book
Get-OfflineAddressbook "Default Offline Address book" | Update-OfflineAddressBook
image
To Verify
**Property Last Touched Time Gets updated**
Get-OfflineAddressbook | FT Name,LastTouch*
image
or
You can Restart
Microsoft Exchange Mailbox Assistant Service
As that’s the service does all the job in the background
Restart-Service MsExchangeMailboxAssist*
image
Additional Info –
Type of Distribution used in Exchange 2013
Exchange 2013 Uses only One Type of Distribution –Web-Based Distribution
1 .Web-Based distribution
image
2. Public Folder distribution (Removed in Exchange 2013)
Earlier
Earlier Version Like Outlook 2003, Offline address book are Downloaded via Public Folders,
Offline Address Book Version In Exchange 2013
For Outlook 2010, Outlook 2007 clients it uses OAB version 4
Get-OfflineAddressbook
image
Great !!
You Learnt How Offline Address book works in Exchange 2013