Tuesday, June 27, 2017

Exchange 2010 CAS server recoverserver failed due to different SID of the computer account


We shut down one of our Exchange 2010 CAS for a few months, Windows group thought we don't need it and killed VM and deleted Computer object. Although we can kill the server via ADSIeiditor, however,  that's the worst case of scenarios. Instead we asked Windows team to rebuild VM with the same version of OS, the same computer name and joint the domain,

we went over the prereqs for doing this, ran setup /mode:recoverserver option, the recovery mode finished 98% and failed to start MSExchangeADTopology services.


this is the error
 Client Access Server Role                                 FAILED
     The following error was generated when "$error.Clear();
          if ($exsSid -eq $null -or $exsSid -eq "")
          {
          $exsSid = get-ExchangeServerGroupSID -DomainController $RoleDomainCont
roller
          }
          start-setupservice -ServiceName MSExchangeADTopology -ServiceParameter
s $exsSid,$RoleDomainController
        " was run: "Service 'MSExchangeADTopology' failed to reach status 'Runni
ng' on this server.".


The Exchange Server setup operation didn't complete. More details can be found
in ExchangeSetup.log located in the <SystemDrive>:\ExchangeSetupLogs folder.

Exchange Server setup encountered an error.

Rebooted the server, though MSExchangeADTopology service started OK, however, other services cannot be restarted.

So I tried to uninstall the server, and got error that the action of uninstall cannot continue since previous disaster recovery setup was not completed, please resume the disaster recovery maintenance or something like that. If I run setup /mode:recoverserver again and got the dame error as previously

I knew SID will cause the issue as we did disaster recover for Exchange 2003 servers previously. I did search cannot find any, until this one:

https://blogs./technet.microsoft.com/exchange/2007/05/21/how-does-exchange-2007-setup-know-to-resume-a-failed-setup/

By comparing with other working servers, I edit the register key as followings
 (Note: before do any modification of the reg key, we had better export the reg key to a file and do some screenshot as well)

1. delete the WaterMark string for sure
2. Delete Action string with DisasterRecover value
3. Create new Sting Reg_SZ called ConfiguredVersion with version number from UnpackedVersion value

After that, go to control panel -Program Features, remove the Exchange 2010 software, it failed at the first try for failed to stop the MSExchangeADTopology service. I tried to stop the service manually, it restarted the service automatically even I set it start manually, then I tried to disabled it and stop it, it still complained failed to stop the service. so I re-enabled the service and started it manually. this time, uninstalled finished completely successfully. Double check get-Exchangeserver, or Adsieditor, all entries for this server is gone. Well done,