While deploying an Exchange server, you may run into the following error during setup, which will block the installation from continuing.
[07/01/2020] ErrorRecord: Cannot find an overload for "CompareTo" and the argument count: "1". [07/01/2020] ErrorRecord: System.Management.Automation.MethodException: Cannot find an overload for "CompareTo" and the argument count: "1".
This error is definitely cryptic. Thankfully the Exchange Setup Logs (located at “C:\ExchangeSetupLogs\ExchangeSetup.txt”) is excellent at providing more clues when troubleshooting.
In our case, the logs identified that setup was trying to process the Offline Address Book (“OAB”) at the time of the error. The error occurred during a function that contained OAB-related PowerShell commands, including Get-OfflineAddressBook, Get-OabVirtualDirectory, and Set-OfflineAddressBook. So, this was the logical place to continue troubleshooting.
From another Exchange Server, we ran the PowerShell command Get-OfflineAddressBook, and strangely, three address books were returned.
C:\> Get-OfflineAddressBook | Format-List Name Name: Default Offline Address List Name: Default Offline Address List (Ex2013) Name: Default Offline Address List (Ex2013) CNF:3e4b413a-e5d6-4371-8541-defecb812f98
The returned results were strange.
- Default Offline Address List is an OAB from a legacy Exchange installation (Exchange 2010 and earlier) and is common to see in an Exchange environment.
- Default Offline Address List (Ex2013) is present whenever an Exchange 2013 or 2016 server is installed into a legacy Exchange environment. This address list is standard, and it is common to see both this OAB and the first OAB coexisting in mixed Exchange environments.
- Default Offline Address List (Ex2013)CNF:<GUID>, is an address list I had never seen before.
Default Offline Address List (Ex2013)CNF:<GUID> being an unknown quickly became the focus of our investigation.
Knowing this OAB was not typical for an Exchange environment (and the fact I had a known working backup of Active Directory) I decided to delete this OAB. Furthermore, the name of the OAB exceeded the 64 character limit, so it was highly unlikely this was created by an administrator, as the Exchange Admin Center and Exchange Management Shell would have blocked a name of this length.
Oddly, I was having a lot of trouble specifying the name of that OAB in a PowerShell cmdlet. The output from Get-OfflineAddressBook above was precisely how the OAB name was being returned (PowerShell was not wrapping the OAB name to a new line). When specifying the OAB for removal (with Remove-OfflineAddressBook), I tried everything from single space, multiple spaces, no space, trying to imitate a tab or carriage return in the name–nothing worked.
With PowerShell failing me I decided to use ADSI Edit.
Removing an Offline Address Book with ADSI Edit
I always recommend removing an Offline Address Book with PowerShell. PowerShell is the proper way to perform this process. Using ADSI Edit is an absolute last resort and should be used with great care and under the supervision of Microsoft Support.
Warning: ADSI Edit is a raw Active Directory editor, and a mistake could have catastrophic effects on your environment, including outages and data loss. I recommend only proceeding if you have a known working backup of Active Directory and all your data.
ADSI Edit is available from a domain controller, or, a machine running the Remote Server Administration Tools for Active Directory Directory Services (RSAT-ADDS).
Navigate to Start >> All Apps / Programs >> Administrative Tools >> ADSI Edit.
Right-click on the top-level node, ADSI Edit, and select Connect To… from the context menu.

From the Select A Well Known Naming Context drop-down select Configuration. Click Ok.

Expand Configuration [name of your server].
Expand CN=Configuration,DC=<domain name>,DC=<top level domain>.
Expand CN=Services.
Expand CN=Microsoft Exchange.
Expand the name of your Exchange Organization (in our case its SKARO).
Expand CN=Address Lists Container.
Select CN=Offline Address Lists.
From the right pane, right-click on CN=Default Offline Address List (Ex2013)CNF:<GUID> and select Delete from the context menu. Select Yes to confirm the deletion.

If you rerun the Get-OfflineAddressBook cmdlet from the Exchange Management Shell, only two offline address books will be returned.
C:\> Get-OfflineAddressBook | Format-List Name
Name: Default Offline Address List
Name: Default Offline Address List (Ex2013)
At this point, you can rerun the Exchange Setup wizard, and it will complete successfully.

Have you seen this issue before? What did you do to fix it? Drop a comment below or join the conversation on Twitter @SuperTekBoy.
Leave a Reply