We help IT Professionals succeed at work.

Can't uninstall Exchange 2010 with Offline address books

Doug Penneman
I'm finally getting around to getting rid of my 2010 after moving everything to 2016. The error is "This server is responsible for generating an offline address book. Removal is not permitted"  It seems since I have multiple GALs, Address lists, Address book policies and OABs that its a challenge. I thought I could just delete them all and re-create on the new server but it won't let me delete. Each one says it's being used by the other, this and that, etc. It's a vicious circle.  I still need all the address list and OABs for multi-tenant seperation. What do I need to do?
Watch Question

Peter HutchisonSenior Network Systems Specialist

No, do not delete, them  Logon to new the Exchange 2016 ECP page and move the OAB roles over to the new server, so that they generate the OABs instead of the Exchange 2010 servers.

See https://docs.microsoft.com/en-us/Exchange/email-addresses-and-address-books/offline-address-books/oab-procedures?view=exchserver-2019#use-the-exchange-management-shell-to-change-the-organization-mailbox-thats-responsible-for-generating-an-offline-address-book


You say "ECP" but the article does not show how to do it. When I try to use the EMS command it says that GeneratingMailbox can only be used on 2012 or newer OAB. Can I get more detail on what you mean?
I found this script by chance and it worked. a few errors but it worked! Run on 2016 EMS.

new-addresslist "temp_mig"
new-offlineaddressbook "temp_mig" -addresslist "temp_mig"
$tmpoab = get-offlineaddressbook "temp_mig"
$oabs = Get-OfflineAddressBook | where {$_.exchangeversion -like "*14.0*" -and $_.exchangeversion -notlike "default*"}
$oabs | %{$name = $_.Name;
$als = $_.addresslists;
$dn = $_.distinguishedname;
$user = (Get-ADPermission $dn | where {$_.extendedrights -like "*ms-Exch-Download-OAB*" -and $_.isinherited -eq $False}).user;
Get-AddressBookPolicy | where {$_.offlineaddressbook -like "*$name*"} | Set-addressbookpolicy -offlineaddressbook $tmpoab;
remove-offlineaddressbook $_ -confirm:$false;
new-offlineaddressbook -name $name -addresslists $als -GlobalWebDistributionEnabled $true;
add-adpermission $dn -user "$user" -accessrights "ExtendedRight" -ExtendedRights "ms-Exch-Download-OAB";
Get-AddressBookPolicy | where {$_.offlineaddressbook -like "*temp_mig*"} | Set-addressbookpolicy -offlineaddressbook $name;
remove-offlineaddressbook "temp_mig" -confirm:$false
remove-addresslist "temp_mig"  -confirm:$false
Saif ShaikhServer engineer


we can directly delete it via ADSIEDIT:

The location should be:   first organization -> CN=Address Lists Container -> CN=Offline Address Book

If you are decommissioing the 2010 server. Will not harm and you will be able to uninstall exchange 2010 gracefully from control panel.


Thanks guys. I knew about the ADSIedit option but I wasn't sure that it would not orphan the OABs.
Peter HutchisonSenior Network Systems Specialist

ECP is the Exchange Control Panel available via the web on Exchange 2013 or later e.g. https://mail.domain.com/ecp/

Using ADSI is a good alternative to using the EMC console or Powershell if they do not work.