During and Exchange 2010 installation recently, I received the following message during the Client Access Server installation:

Client Access Role
The following error was generated when "$error.Clear(); $thisServer = Get-ExchangeServer $RoleFqdnOrName; $adSiteId = $thisServer.Site; $pureMailboxServersFqdns = Get-ExchangeServer | Where {$adSiteId -eq $_.Site -and $_.IsMailboxServer -and -not $_.IsClientAccessServer} | ForEach {$_.Fqdn}; Get-MailboxDatabase | Where { ($pureMailboxServersFqdns -contains $_.RpcClientAccessServer) -and ($adSiteId -eq (Get-ExchangeServer $_.Server).Site)} | Set-MailboxDatabase -RpcClientAccessServer $thisServer" was run: "Value cannot be null.
Parameter name: key".
Value cannot be null.
Parameter name: key
Elapsed Time: 00:01:22

After searching around for a while I came across a Microsoft message board where I found the answer.  The error was caused because remnants of a previous installation of Exchange 2010 were still lingering around, this particular error caused because the installer found the unattached ghost database from the previous Exchange 2010 installation.  What solved my problem was to open adsiedit and remove the old database remants located beneath ConfigurationCN=Configuration,DC=<org>,DC=<suf>CN=ServicesCN=Microsoft ExchangeCN=<org>CN=Administrative GroupsCN=Exchange Administrative Group (FYDIBOHF23SPDLT)CN=Databases.

Before doing this, be sure you know that you are deleting the correct database entries, if you delete incorrect entries you will be causing irreperable damage to your current Exchange environment.