Now that you have prepared an organization to support
Exchange 2013, you can deploy some servers. The first task is to
install the set of prerequisite software on the servers you plan to use
for Exchange 2013. Windows 2012 servers are easier to prepare because
they include many of the necessary prerequisites.After .NET
Framework 4.5, Windows Management Framework 3.0, and Windows PowerShell
3.0 are installed on a server, both the GUI and command-line versions
of the Exchange 2013 installation program offer the option to configure
all the remaining prerequisites thereafter automatically. Figure 1
shows how the GUI version of Setup offers the option to install any
required Windows roles and features. You’ll be prompted if any of the
roles and features Setup installs requires a server restart. If a
Windows hotfix or something else is missing that Setup can’t install,
you have the opportunity to install the missing item and then retry, or
if you have to exit Setup, you can restart from the place you left off.
By
comparison, to run setup.com to install a typical Exchange 2013 server
including any required Windows server roles and features, you type this
command into a CMD session:
Setup.com /Mode:Install /roles: "ClientAccess, Mailbox" /InstallWindowsComponents /IacceptExchangeServerLicenseTerms
It’s
usually better to prepare a server by installing all the necessary
Windows features before moving on to tackle Exchange. You can add all
the necessary features by:
Selecting and installing each feature with Windows Server Manager. This is the slow but steady option.
Running
one of the installation configuration files provided with Exchange.
This can be a good option when you build an automated deployment script.
Installing
the set of required features with the Add-WindowsFeature cmdlet
(Windows Server 2008 R2 SP1) or Install-WindowsFeature cmdlet (Windows
Server 2012). This option takes just a few minutes to complete,
including the invariable system restart.
Microsoft
includes a set of XML configuration files in the
\Setup\ServerRoles\Common folder on the Exchange installation kit that
you can run to configure a server. These files (such as
Exchange-MBX.xml) can be used only for installations on Windows 2008 R2
SP1 servers. The commands they contain are directives for the Windows
PowerShell ServerManagerCmd module that tell it how to install the
required Windows features for different types of Exchange 2013 servers.
To
configure the required features with one of the provided XML files, run
Windows PowerShell as an administrator and use the Import-Module cmdlet
to add the ServerManager module to the set of modules available in the
session. You can then select the most appropriate XML file from those
provided in the \Scripts directory (or copy the selected file to a
suitable location for use during your installation) and input that in
the ServerManagerCmd cmdlet, which then installs the features specified
in the configuration file. Any features that are already configured
will be ignored. Table 1
lists the available files on the installation kit. For example, the
command to configure a typical multi-role Exchange 2013 server is:
ServerManagerCmd –ip \Scripts\Exchange-TYPICAL.xml
Table 1. XML configuration files to prepare Exchange 2013 servers
SERVER ROLES | SCRIPT |
---|
ALL (All) | ServerManagerCmd –ip \Scripts\Exchange-ALL.xml |
BASE (Basic prep) | ServerManagerCmd –ip \Scripts\Exchange-BASE.xml |
CADB (Admin and Mailbox) | ServerManagerCmd –ip \Scripts\Exchange-CADB.xml |
ECA (Admin tools) | ServerManagerCmd –ip \Scripts\Exchange-ECA.xml |
TYPICAL (Multi-role server) | ServerManagerCmd –ip \Scripts\Exchange-TYPICAL.xml |
The InstallWindowsComponent.ps1 script is provided for use on
Windows 2012 servers. This script ignores the XML files because it
specifies the necessary Windows features in its code. The script is in
the \Setup\ServerRoles\Common folder. To run the script, open a Windows
PowerShell session and type the name of the script plus the type of
role you want to configure. The supported values are MBX (mailbox), CAS
(Client Access Server), and AdminTools (Exchange 2013 Administration
tools). For example:
.\ "C:\Program Files\Microsoft\Exchange Server\V15\Bin\InstallWindowsComponents.ps1" MBX, CAS, AdminTools
Another
switch, called /ADToolsNeeded, is provided to enable you to install the
Active Directory administration tools on a server that you want to use
to run Setup /PrepareSchema or Setup /PrepareAD. To use this parameter,
specify –ADToolsNeeded $True.
Because the script is written in
Windows PowerShell, it provides an opportunity for repurposing the
script by either editing it to satisfy your purposes or including it in
whatever other code you use to configure servers.
A list of the full set of Windows features you must configure for each role is available at http://technet.microsoft.com/en-us/library/bb691354(v=exchg.150).aspx, including commands that you can cut and paste into a Windows PowerShell session to configure different types of servers (Figure 2).
This avoids typing mistakes and ensures that you include all the
necessary components. If you want, you can create your own scripts to
automate the deployment process and use the Add-WindowsFeature cmdlet
(for Windows 2008 R2 SP1) or Install-WindowsFeature cmdlet (for Windows
2012) to add the different components for the server roles you require.
Some idea of the close relationship that exists between Exchange and
Microsoft Internet Information Services (IIS) is shown by the number of
IIS features that must be installed before you can deploy Exchange.
These extensions support critical components such as Remote PowerShell,
Outlook Web App, and the Exchange Administration Center application.
It’s easy to start a Windows PowerShell session and install the necessary Windows components (Figure 2)
by just copying the commands from the Exchange documentation on TechNet
and pasting them directly into Windows PowerShell. This avoids typing
mistakes and ensures that you include all the necessary components.
Exchange 2013 Mailbox and multirole servers require the
installation of Microsoft Unified Communications Managed API 4.0 Core
Runtime 64-bit. This name is a bit of a mouthful, and it’s easier to
refer to it as UCMA. Unified Messaging functionality is now
incorporated in the mailbox role. Even if you have no intention of ever
using the Unified Messaging functionality or connecting Exchange with
Lync, you still need to install UCMA.
After Active Directory is prepared and you have installed the
necessary prerequisite software and features, you can install Exchange
by using the GUI version of the setup program, or you can use the
command-line version.
Exchange 2013 Setup supports four distinct modes:
Installation of a new server. This mode includes the option to install a new role on an an existing server.
Note
If
you use a cumulative update to install Exchange on a new server, setup
performs a complete installation from scratch. You do not have to apply
any other updates after the base installation finishes. A cumulative
update can also be used to update the version of Exchange running on a
server.
Uninstall. Exchange 2013 cannot remove a role from a server; you have to remove the complete server.
B2B (build to build), which is the installation of a new build of Exchange on top of an existing server. Use
this mode to apply cumulative updates; it’s also used extensively
during the development phase of the product when the engineering group
generates a new build nightly. All server roles are upgraded at one
time during a B2B run; due to the dependency among various shared
components, you cannot apply a new software build to just one role on a
server. The command-line switch to apply a B2B update is Setup
/Mode:Upgrade.
Disaster recovery, which rebuilds a server based on its configuration data stored in Active Directory. This
mode does not recover any of the mailbox or public folder databases
that might have been present on the server; these have be restored
separately. The command-line switch for this mode is Setup
/Mode:RecoverServer.
After
initialization, the setup program takes you through multiple stages to
gather information about the environment and to validate that all the
necessary prerequisites exist to allow the installation to proceed
before creating the files on disk to build the chosen roles for the new
server. As mentioned earlier, Setup installs any missing Windows server
roles and features Exchange requires if you allow it to do so.
My
experience is that the first installation of Exchange 2013 on a server
invariably requires a system restart to complete the process. The time
required to install a brand-new server from start to finish varies
according to server size and configuration, but you can certainly
expect to be finished in well under an hour, especially if you install
only a single role on a server. All the steps to deploy prerequisite
software and then to install Exchange can be scripted for unattended
installs. Installing Exchange on a virtual server (Hyper-V or VMware)
follows the same course as on a physical computer, assuming that you
have done the necessary work to prepare the virtualization platform for
Exchange by configuring the virtual servers with appropriate CPU, disk,
and memory resources according to the recommendations published by the
virtualization platform vendor.
As it runs, Setup captures
details of its progress in a watermark stored in the system registry to
enable it to restart from the point of failure. As components are
installed, Setup updates the watermark in the system registry to
identify the exact state in the procedure. Setup also captures state
information such as the options that you selected for the installation.
Together, the state information and watermark mean that you can restart
Setup from the point of failure (including a cancelled installation)
without having to input all your options again.
Troubleshooting A failure occurs during setup
If
a failure occurs, you will not be able to run Setup in a different mode
until you complete the process that you started in the original mode.
For example, if a server fails in the middle of installing a new role,
you have to go back and complete or undo the installation before you
can execute Setup in another mode (such as applying an upgrade).