I recently worked on a project where I had to install Exchange Server 2016 on an Azure VM and I chose a D2 sized Azure VM (2 cores, 7GB RAM) thinking that will suffice, well that was a big mistake.
The installation made it to the last step before a warning appeared informing me that the server is low on memory resources and eventually terminated the installation, leaving it incomplete.
Let this be a warning to the rest of you, choose a D3 or above sized Azure VM to save yourself a whole lot of agony.
To try and salvage the Exchange install I attempted to re-run the installation as it detects an incomplete installation and tries to pick up where it failed previously, this did not work.
I then tried to uninstall Exchange completely by running command: “Setup.exe /mode:Uninstall /IAcceptExchangeServerLicenseTerms”. This also did not work as it was trying to uninstall an Exchange role that never got installed, this left me one option manually remove Exchange from Active Directory and rebuild the Azure VM.
To remove the Exchange organisation from Active Directory I had to complete the following steps;
- On a Domain Controller | Open ADSI Edit
- Connect to the Configuration naming context
- Expand Services
- Delete CN=Microsoft Exchange and CN=Microsoft Exchange Autodiscover
- Connect to the Default naming context
- Under the root OU delete OU=Microsoft Exchange Security Groups and CN=Microsoft Exchange System Objects
- Open Active Directory Users and Computers
- Select the Users OU
- Delete the following:
- Exchange Online-ApplicationAccount
After Exchange was completely removed from Active Directory and my Azure VM was rebuilt with a D3 size I could successfully install Exchange Server 2016.