RecoverServer in a DAG
When you want to recover an Exchange Server with information stored in Active Directory you can use the setup.com /RecoverServer option. The setup will install Exchange Server, but instead of entering all configuration information it is retrieved from Active Directory.
This works pretty well, but you have to do some additional steps when the Exchange Server is part of a Database Availability Group (DAG). You can use various cmdlets on other Mailbox Servers in this DAG:
- Remove any existing mailbox database copies that exist on the server you want to recover. Use the Remove-MailboxDatabaseCopy <> cmdlet to achieve this;
- Remove the server you want to recovery from the Database Availability Group using the Remove-DatabaseAvailabilityGroupServer -Identity DAG -MailboxServer <> to achieve this;
- On the new server, you can use the setup.com /RecoverServer option to reinstall the Mailbox Server that's part of the DAG;
- When the server is fully configured, you can add the Mailbox Server again to the Database Availability Group using the Add-DatabaseAvailabilityGroupServer -Identity DAG -MailboxServer <> cmdlet;
- Add a new copy of the Mailbox Database to the newly installed server using the Add-MailboxDatabaseCopy -Identity <> -MailboxServer <> cmdlet.
Your server is now fully recovered.