How to Use Unattended Mode in Exchange Setup?
Summary: In unattended mode, you can automate the installation of Exchange Server using the command line. In this post, we’ll discuss the detailed process of installing an Exchange Server in unattended mode. We’ll also mention an Exchange repair software that can help recover databases in case something goes wrong.
You can automate the installation of Exchange Server by running the setup from the command line. This scenario is called unattended installation mode. This allows to deploy servers easily, using command line switches, with minimum intervention from the administrator or installer of Exchange Server. Let’s discuss the process of installing the Exchange Server in the unattended mode.
Step-by Step Process to Install Exchange Server in Unattended Mode
The installation process is divided into three parts:
- Preparation of the Active Directory
- Preparation of the Active Directory Schema
- Executing the unattended installation
Note: This process is intended for Exchange Server 2019, but it can be easily adapted to previous Exchange versions.
Before you Proceed
Before proceeding, you need to ensure that all the prerequisites have been already installed and the environment is ready to host Exchange Server 2019. The operating system hosting the Exchange Server is already patched with all the Windows and security patches, and is compatible with the Exchange Server 2019 recommended by the vendor. The hardware is configured with the specific requirements, and failover and high availability is ensured.
You must also ensure that the latest ISO file of the Exchange Server is downloaded and available on the destination server, which will host the new Exchange Server.
Preparing the Active Directory
As you may know, the installation is heavily dependent on the Active Directory. Therefore, it must be prepared accordingly. You can run the following command from an elevated command prompt on the server to get the Active Directory and its environment ready to host the Exchange Server 2019.
Setup /IacceptExchangeServerLicenseTerms /PrepareAD
Note: Although Exchange Server 2019 can coexist with Exchange Server 2013 or 2016, since it’s installed first, you will not be able to install a parallel older version with Exchange Server 2019. If you wish to install different version, you need to install the older version first.
Preparing the Active Directory Schema
The schema stores most of the Exchange Server configurations. In fact, you can restore a failed server with all the configurations from the Active Directory, except the Send connectors. Similar to the Active Directory preparation script, you need to open an elevated command prompt and run the following command.
Setup /IacceptExchangeServerLicenseTerms /PrepareSchema
Starting the Unattended Installation
The installation will install the below features:
- Management Tools
- Transport Service
- Client Access Service
- Mailbox Service
- Front End Transport Service
- Client Access Frontend Service
Open an elevated command prompt and run the following command if all the components are already installed.
Setup.EXE /Mode:Install /IAcceptExchangeServerLicenseTerms /Roles:MB
To install the Windows components, run the below command.
Setup.EXE /Mode:Install /InstallWindowsComponents /IAcceptExchangeServerLicenseTerms /Roles:MB
You must take also into consideration a few things after running the above command. You might see the installation as hanged at a certain percentage. Do not worry! The installation takes some time to finish. Do not try to stop it. If it is stopped, you will end up doing a lot of clean-up work.
It’s important to run the command in full. If the command misses something, like the acceptance of the license terms, it will fail to install.
If you are installing with an existing Exchange Server 2016 or 2013 and MAPI over HTTP is disabled, the installation will throw a warning.
Post Installation Work
Although the installation can be automated with the preparation of the Active Directory and the Active Directory Schema, there are some things that you need to set manually, after the installation of the Exchange Server and its roles. These are:
- Licensing – Standard or Enterprise
- Configuration URLs for the external and internal connectivity
- Allowing access (or not) to the Exchange Admin Center (EAC) from the outside
- Installation and configuration of Server Certificates
- Configuration of storage
- Setting up high availability of the Exchange Server (if you need)
Finally, you need to verify the installation of your Exchange Server. This can be done by running the Get-ExchangeServer command from the Exchange Management Shell (EMS). This will return all the details of your Exchange Server.
Apart from this, you can also check the Application Log in the Event Viewer and check the C:\ExchangeSetupLogs for any warnings or errors.
Above, we have gone through the detailed process of installing an Exchange Server in unattended mode. However, you also need to consider if something goes wrong, resulting in server failure or database corruption. In such a case, you can rely on an Exchange Server Recovery application such as Stellar Repair for Exchange. With this application, you can open multiple databases (healthy or corrupted) of any version of Exchange Server, with no size limit. You can browse through them and granularly export to PST and other files formats. You can also directly export user mailboxes, archives, shared mailboxes, disabled mailboxes, and public folders to live Exchange Server database and Office 365 tenant.