Error Solved: “Server is not found in Active Directory. Server must be present in Active Directory to recover”

Summary: In this guide, you will learn to fix the error “Server is not found in Active Directory. Server must be present in Active Directory to recover.”, through a few troubleshooting steps and restore your failed or corrupt Exchange server.

What causes “Server is not found in Active Directory” Error?

The error appears when an Exchange admin attempts to rebuild and restore a failed or corrupt Exchange server by using Setup /m:RecoverServer command.

The Setup /m:RecoverServer command basically reads the settings and information stored in Active Directory (AD) of the failed Exchange server to rebuild a new Exchange server.

While running this command in Exchange Management Shell (EMS), the server name should be the same. If you enter the wrong name or parameter, the command may fail to execute.

And if it can’t read the information stored in Active Directory due to inaccessible or corrupt AD, following error message is displayed in the output screen of Exchange Management Shell (EMS).

Server is not found in Active Directory. Server must be present in Active Directory to recover. Exchange Server setup encountered an error.”

Read how to use Setup /m:RecoverSetup switch in Exchange to know more.

How to Resolve “Server must be present in Active Directory to recover” Error?

To resolve this error, you can follow these troubleshooting steps.

Step 1: Ensure New Exchange Server is a Replica of Failed Server

Before executing Setup /m:RecoverServer, you must create a new server with the same name, hardware and software configuration. It must be running on the same Windows server version as the failed one.

Volumes on the new server should be identical and have the same drive letter that was on the old server. Also, if the old server was using SSL/TLS issued by some certification authority, make sure to reimport and configure the certificate.

Step 2: Install Server Requisites

Before executing the Setup /m:RecoverServer switch, install Exchange pre-requisites on the new server.

Install-WindowsFeature RSAT-ADDS
Import-Module ServerManager
Add-WindowsFeature NET-Framework,RSAT-ADDS,Web-Server,Web-Basic-Auth,Web-Windows-Auth,Web-Metabase,Web-Net-Ext,Web-Lgcy-Mgmt-Console,WAS-Process-Model,RSAT-Web-Server -Restart

The server will restart after installing the pre-requisites.

Then try to execute the Setup /m:RecoverServer command. If the error still appears, follow the next step.

Step 3: Use ADSI Editor for Exchange

Active Directory Service Interface or ADSI Editor is Directory Access Protocol editor that is used to manage attributes and objects in Active Directory. Follow these steps to remove objects from Active Directory to fix the error,

  • Connect and login to the domain controller as administrator

NOTE: To do this, you must be a member of Enterprise or Domain Admin.

  • Press Windows Key + R, type ADSIEdit.msc and press ‘Enter’ or click ‘OK’
  • Go to ‘Action>Connect to’ and click on ‘Select a well known Naming Context’
  • From the drop-down, choose ‘Configuration’
  • Next, expand ‘CN=Configuration, DC=[YourDomain], DC=COM> CN=Services>CN=Microsoft Exchange’
  • Then expand and navigate to CN=OrganisationName> CN=Administrative Groups>CN=Exchange Administrative Groups(FY….)>CN=Servers
  • From the right pane, choose the Exchange server and select ‘Delete’
  • Then navigate to CN=Configuration [domain], DC=COM> CN=Services> CN=Microsoft Exchange> CN=OrganisationName> CN=Administrative Groups>CN=Databases
  • Search and delete all the databases related to the old server from the right panel

CAUTION: Take thebackup of database from the old server before executing these steps.

IMPORTANT NOTE: Although ADSI Edit may help you fix the problem, it should be used with care as it may cause severe issues if something goes wrong.

Step 4: Use Exchange Recovery Tool

You should use an Exchange recovery tool such as Stellar Repair for Exchange if nothing works and the error ‘Server is not found in Active Directory. Server must be present in Active Directory to recover.’ still appears while executing Setup /m:RecoverServer command.

free download software

By using the tool, you can repair and export mailboxes from Exchange database (EDB) files on old server to PSTs. These PSTs then can be imported to the user mailboxes.

And in this case, when the command is not able to read information from AD, you can repair the EDB files on the old server and export the mailboxes directly to a new Exchange server that you have setup.

Stellar Repair for Exchange is a highly recommended tool by MVPs. It helps you restore your Exchange server with ease.

Rating by MVP:



Though Setup /m:RecoverServer helps restore a failed Exchange server, it might fail in many scenarios.

For example, this command requires you to create a replica of the failed server and set up the new Exchange with same domain name and configurations, which also include minor details such as same drive volume letter. Also, the command recreates Exchange mailbox database on the new server by using the information stored in the Active Directory of the failed server. If the cmdlet fails to access or fetch required information from the AD, the error ‘Server is not found in Active Directory. Server must be present in Active Directory to recover.’ appears.

This happens when the AD along with Exchange database is either corrupt or inaccessible. However, this is a critical situation that requires you to repair the Exchange database since AD is also damaged. After database repair, you can extract the mailboxes and then restore them to a new Exchange server.

To make this easier and avoid further downtime caused by server failure, you should use an Exchange recovery tool. It will help you to repair the damaged Exchange database and restore user mailboxes directly to your new live Exchange server.