When attempting to install Exchange Server 2013 setup may fail with an error message:

Setup encountered a problem while validating the state of Active Directory:
Couldn’t find the Enterprise Organization container. See the Exchange setup log for more information on this error.
For more information, visit: http://technet.microsoft.com/library(EXCHG.150)/ms.exch.setupreadiness.AdInitErrorRule.aspx

Reviewing the Exchange setup log (C:\ExchangeSetupLogs\ExchangeSetup.log) shows similar messages.

[11/12/2014 06:36:10.0207] [1] Failed [Rule:AdInitErrorRule] [Message:Setup encountered a problem while validating the state of Active Directory: Couldn’t find the Enterprise Organization container. See the Exchange setup log for more information on this error.]
[11/12/2014 06:36:10.0223] [1] [RECOMENDED] Setup will prepare the organization for Exchange 2013 by using ‘Setup /PrepareAD’. No Exchange 2007 server roles have been detected in this topology. After this operation, you will not be able to install any Exchange 2007 servers.
[11/12/2014 06:36:10.0223] [1] [RECOMENDED] Setup will prepare the organization for Exchange 2013 by using ‘Setup /PrepareAD’. No Exchange 2010 server roles have been detected in this topology. After this operation, you will not be able to install any Exchange 2010 servers.
[11/12/2014 06:36:10.0223] [1] [REQUIRED] Setup encountered a problem while validating the state of Active Directory: Couldn’t find the Enterprise Organization container. See the Exchange setup log for more information on this error.
[11/12/2014 06:36:10.0223] [1] Help URL: http://technet.microsoft.com/library(EXCHG.150)/ms.exch.setupreadiness.AdInitErrorRule.aspx
[11/12/2014 06:36:10.0238] [1] Ending processing test-SetupPrerequisites

This problem can occur when installing Exchange Server 2013 into an Active Directory forest that previously contained an Exchange organization.

I have reproduced this error condition in a test lab environment after encountering it at a customer site:

  • An on-premises Exchange Server 2007 organization existed
  • The business migrated to Office 365
  • The on-premises Exchange server was cleanly and completely uninstalled

Under these conditions setup of Exchange Server 2013 CU6 will fail. The problem may also occur with pre-existing Exchange Server 2010 organizations, or with other builds of Exchange 2013, but I have not tested all of those scenarios.

The solution is to re-run setup for the previous version of Exchange to prepare Active Directory again. There is no need to fully install a server, simply preparing Active Directory should be enough.

For example, with Exchange Server 2007 (SP3) the following command is run:

C:\Admin\Ex2007sp3> setup /preparead /on:"First Organization"

(The /on: switch is short for /OrganizatioName, and “First Organization” is the name I gave my organization. You should use the appropriate organization name for your environment, which can’t be changed later.)

Let’s walk through the scenario in more detail. An Exchange Server 2007 organization exists, with the usual containers visible in ADSIEdit.

exchange-2013-setup-fails-01

Exchange 2007 is cleanly removed from the environment.

exchange-2013-setup-fails-03

After removal, the Microsoft Exchange System Objects container is still visible in Active Directory Users & Computers (select View -> Advanced Features to see it), with the Exchange Install Domain Servers group still present.

exchange-2013-setup-fails-04

The Microsoft Exchange Security Groups container is also still visible in Active Directory Users & Computers, with the Exchange Trusted Subsystem group the only group left behind (all other groups normally seen here have been removed by the uninstall process).

exchange-2013-setup-fails-05

The organization is no longer visible in ADSIEdit.

exchange-2013-setup-fails-06

The simplest execution of Exchange Server 2013 setup is to prepare the schema. The command line is:

C:\Admin\ex2013cu6> setup /prepareschema /IacceptExchangeServerLicenseTerms

This fails with the error message.

exchange-2013-setup-fails-07

If you search the internet for information on this error “Couldn’t find the Enterprise Organization container” you will encounter some advice about manually deleting certain containers and objects from Active Directory. In my testing none of these actions helps to resolve the issue, and in some cases make things worse.

However, re-running Exchange 2007 (SP3) setup as mentioned earlier to prepare Active Directory resolves the issue and allows Exchange Server 2013 setup to proceed as normal.

About the Author

Paul Cunningham

Paul is a former Microsoft MVP for Office Apps and Services. He works as a consultant, writer, and trainer specializing in Office 365 and Exchange Server. Paul no longer writes for Practical365.com.

Comments

  1. Ed Crowley

    Removing the Microsoft Exchange System Objects and Microsoft Exchange Security Groups containers resolved it for me. I had removed everything but those, including their contents. Thanks!

  2. JP

    Worked great! I’m a late updater to removing an SBS 2008 server and became stuck on this last hurdle. I also read the post about deleting items from the AD and did not feel comfortable goign that route. Thanks again!

  3. Mikael Hansen

    I recently removed the last Exchange 2010 server and wanted to install 2019 and ran into this. all other suggestions was the same as the MS KB the installer linked to – delete the containers in AD, which did absolutely nothing.
    Ran .\setup /PrepareAD /OrganizationName:”OrganizationName” from powershell and after it was done, the installation for Exchange 2019 ran smoothly.

    1. Chris

      I want to chime in here –

      Had Exchange 2010 SP3 previously, moved to a hosted Exchange, then brought our e-mail back in house with Exchange 2019 CU8. We were having the same error and ran ‘ .\setup /PrepareAD /on:”our org” ‘ from an Exchange 2010 installer directory. We did have to install .NET 3.5 on the server before Exchange 2010 setup would run.

      After doing that, Exchange 2019 setup ran with absolutely no troubles.

  4. Mike

    Thank you Paul,
    I was in the late stages of a migration from 2003 SBS. I hit this error and have been stalled. I removed all of the microsoft exchange components from my interim 2003 AD and got this error as I began to install Exchange 2016 on the new network servers. When I couldn’t prepare the AD using 2003 Exchange, I finally tried Exchange 2007 and I’m pleased to report that preparing the schema and preparing AD using the 2007 Exchange ISO and this got me through the Exchange 2016 prepare schema and prepare AD.

    There isn’t a lot of good information about this situations. I kept coming back to your blog as everything else I tried left me in the same situation. I’m happily installing exchange 2016 after a month of trying to beat this issue. I started my swing server process twice starting all over.

    Thanks for taking the time to make this information available. I wish I had found it a month ago!!

  5. Ken Wilson

    Hello,

    The fix “setup /preparead /on:”First Organization” worked for me. The customer had removed SBS2011 and gone to OFfice365 years ago but they are expanding and wanted AdConnect with a hybrid.

    This even worked after I removed the two remaining old OU’s as listed above.

    Thanks Paul!

  6. Stéphane RUCHET

    Thanks Paul for your answer !

    I have spent quite some time looking for the setup files on Microsoft’s websites, with no success. Maybe you have “special” access that I don’t have (MSDN, …).

    Sad that I have to use torrents to download very old setup files.

  7. Stephane

    I have a really stupid question : I had Exchange 2007 installed (SBS 2008). No media … how and where (on DC, on new Exchange server, …) do I launch the setup of 2007 ?

    1. Paul Cunningham

      You can download Exchange 2007 setup files from Microsoft. Setup can be run on either server, you’re not actually installing Exchange 2007 just running the AD prep steps.

  8. Fred Brown

    Much appreciated!

    I’d removed Exchange 2010 completely in my lab and wanted to install Ex 2013. Same error and running the Ex2010 /PrepareAD did the trick.

    Thanks!!!

  9. kas

    it works!!!!!!!
    Thanks!

  10. JJM

    Paul – Seriously…. THANK YOU!! – This was the only solution that worked.

    I’m just really lucky my Google skills are better than my Exchange ones. Phew!

    Cheers!

  11. Jeff Creedon

    I tried what Sergejs Kacs did

    “[R]emoving via ADUC in Advanced view “Microsoft Exchange System Objects” together with removing via ADSI from CN=Services
    “CN=Microsoft Exchange” ”

    and that worked perfectly. Two days of head banging completed. On to the next headache.

  12. Sergejs Kacs

    I had similar issue after manual removing Exchange 2003 and trying to install Exchange 2016.
    [Setup.exe /PrepareAD /OrganizationName:”First Organization” /IAcceptExchangeServerLicenseTerms] – not helped.
    But removing via ADUC in Advanced view “Microsoft Exchange System Objects” together with removing via ADSI from CN=Services
    “CN=Microsoft Exchange” helped me.

    1. Michael Moos

      Did the exact same thing, moving from an old Exchange 2007 (SBS 2008) to a new Exchange 2019
      Thank you guys!

  13. DLM

    Genius – Thanks for your help.

    I ran preparead using the Exchange 2010Sp3 setup. It completed and I am now able to install 2016. (Or at least get further) 😉

    1. Mikael Hansen

      I also succeeded by doing:
      .\setup /PrepareAD /OrganizationName:”OrganizationName”
      In powershell – was able to install Exchange 2019 afterwards with no issues.

  14. Steve Ramsay

    Thanks Paul

    Your fix also applies and works when installing Exchange 2016 with the same error (also being the only error preventing me from installing).

    Using Exchange 2013: Setup.exe /PrepareAD /OrganizationName:”” /IAcceptExchangeServerLicenseTerms

    …completed and then I was able to install Exchange 2016 successfully.

    Thanks for your help.

  15. Les

    Thank you, Paul. Exact same situation as many others. This is the only post that worked.

  16. Lars

    Awesome, it actually helped me as well!

  17. JM

    Downloaded an eval of 2007 and run the steps you mentioned and then back to 2013 and it now works! Thanks. I have spent hours looking for a solution to this problem that works. 🙂

  18. Chrysostomos Psaroudakis

    YOU ROCK MAN!!!!!!!

    1. Eddy

      ROCK MAN!!!!!!! You save our life!

  19. TB

    Thx Paul. Exactly this scenario — total removal of Exchange 2007 SP3 from one server and installing a fresh Exchange 2013 CU8 on another. Your suggested command did the trick, but note that I had to reboot both servers and restart the Exchange 2013 CU8 installation as the Retry button on the installer interface gave the same error before I did that:

    C:homsExchange 2007 SP3>setup /preparead /on:”First Organization”

    Welcome to Microsoft Exchange Server 2007 Unattended Setup

    Preparing Exchange Setup

    No server roles will be installed

    Performing Microsoft Exchange Server Prerequisite Check

    Organization Checks ……………………. COMPLETED

    Configuring Microsoft Exchange Server

    Organization Preparation ……………………. COMPLETED

    The Microsoft Exchange Server setup operation completed successfully.

    ==> Rebooted the servers and restarted the Exchange 2013 CU8 installation and away it went…

    thx!

  20. Troy Ayers

    Like the error says “Couldn’t find the Enterprise Organization container”… and sure enough it really, really didn’t exist. ADSIedit, showed same thing of course. Our situation was similar… never had exchange. No exchange 2007 involved anywhere. installed exchange 2013 (CU 5, I think), had some issues, uninstalled it. Came up with this error when trying to re-install.

    After stumbling across tons of sites that seems to indicate there was a Dupe Microsoft Exchange System Objects or that I needed to delete it the Object, which didn’t make sense, as it did NOT exist in the first place, this is the ONLY thing that has work to create (or re-create?) the requirements for exchange 2013 MESO…. WHEW! Thank you very much for taking the time to post this info.

  21. wengkito

    it works, thanks

Leave a Reply