Installing Exchange Server 2010 : Command-Line Setup

The Exchange Server 2010 Setup program includes a powerful set of command-line options that can help you completely automate an Exchange server setup or perform custom setup options that you could not do through the GUI. The command-line setup options are broken into seven categories of setup:

  • Installing Exchange server roles

  • Removing Exchange server roles

  • Recovering an existing Exchange server

  • Preparing the Active Directory to support Exchange

  • Creating delegated or pre-provisioned servers

  • Adding or removing Unified Messaging language packs

  • Adding or removing Exchange language packs

All of these options are used by running the setup.com program, not setup.exe.

The Usefulness of Command Line Installations

A lot of Exchange Administrators wonder why the command line setup options even exist since the graphical user interface is so easy to use and has most of the same options. Consider the case of organization JCE that is installing 30 Mailbox servers, 18 Client Access servers, and 12 Hub Transport servers.

Due to their organization’s requirements for certifying a production IT system, all server builds have to be thoroughly documented prior to being deployed. By generating the installation scripts ahead of time, their Exchange team can ensure that each server is built exactly to the design specifications and with the necessary options. This speeds up the overall installation and ensures that nothing is overlooked.

1. Command-Line Installation Options

By and large, the server role installation options are probably the most useful for a typical person installing or configuring Exchange. They are certainly the most numerous. If you use some of these setup.com options, they will have some required parameters. For example, if you use the /mode:install option, you will also have to specify which server role or roles you are installing. Table 1 lists the installation options.

Abbreviations and Shortcuts

Most of the command-line switches and options have a long and short option. For example, the following two commands accomplish exactly the same thing (installing the Mailbox role):

  • setup /m:install /r:m

  • setup /m:install /r:mb

  • setup /m:install /r:Mailbox

We have chosen to spell out the options completely to more clearly illustrate the commands and in the hope that you will remember them more easily. However, once you learn the long version of the options, you will probably find it easier to use the shorter versions. They are just a bit cryptic when you are learning.

 

Table 1. Exchange Server 2010 Installation Options
Option Optional (O) or Required (R) Explanation
/mode or /m R Specifies whether the Setup program is installing a new role or removing it. Valid options are:

/mode:install

/mode:uninstall

/mode:upgrade

/roles or /r R Specifies which roles are being installed. Valid role types are:

Client Access, CA, C

Edge Transport, ET, E

Hub Transport, HT, E

Mailbox, MB, M

ManagementTools, MT, T

Unified Messaging, UM, U

/OrganizationName O Allows you to specify an organization name; this is only necessary if this is the first server being installed in the Active Directory forest and the /PrepareAD step has not previously been done.
/TargetDir O Allows you to specify an optional path for the Exchange program files rather than the default location on the C:\ drive.
/SourceDir O Specifies the location for the Exchange installation files.
/UpdatesDir O Specifies a path to look for updates from after the installation is completed.
/DomainController O Allows you to specify the NetBIOS name or the FQDN of a domain controller.
/AnswerFile O Allows you to specify a text file that contains answers to some of the advanced setup parameters.
/DoNotStartTransport O Tells Setup to not allow the transport service on a Hub Transport or Edge Transport server.
/EnableLegacyOutlook O Tells Setup to create a public folder tree and public folder database on a mailbox. This is only valid for the first Mailbox server role that is being installed in a new organization.
/LegacyRoutingServer O Tells Setup to create a routing group connection to an Exchange 2003 bridgehead server. This option is only valid for the first Hub Transport server that is being installed in an Exchange 2010 organization.
/EnableErrorReporting Configures Exchange Server to report errors automatically to Microsoft. All server roles can use this option. The default is not to enable this feature.
/CustomerFeedbackEnabled O Configures Exchange Server to report usage information to Microsoft automatically. All server roles can use this information. This is used with the /Industry switch.
/Mdbname O Specifies the name of the default mailbox database when installing a Mailbox server.
/DbFilePath O Specifies the path and name to the default database file. This is used in conjunction with the /Mdbname and the /LogFolderPath switches.
/LogFolderPath O Specifies the path for the log files for the default database when installing a Mailbox server role.
/ExternalCASServerDomain O Allows to you to specify the external URL that will be used by Internet clients accessing the Client Access server. This is only used for Client Access servers.
/NoSelfSignedCertificates O Instructs Setup not to create self-signed certificates for the Client Access or Unified Messaging server roles.
/AdamLdapPort O Specifies the LDAP port number to be configured for an Edge Transport server’s ADAM database.
/AdamSslPort O Specifies the LDAPS port number to be configured for an Edge Transport server’s ADAM database.

2. Command-Line Server Recovery Options

There may come a time when you have to recover an Exchange server from a backup. This process will involve rebuilding the Windows server, then reinstalling Exchange Server using the Recover Server mode. This option will read most of the configuration of the server from the Active Directory rather than installing the server from scratch. Several options are available when recovering a server, as shown in Table 2.

Table 2. Exchange Server 2010 Server Recovery Setup Options
Option Optional (O) or Required (R) Explanation
/mode:RecoverServer R Specifies that the installation mode is to be the Recover Server option.
/TargetDir O Allows you to specify an optional path for the Exchange program files rather than the default location on the C:\ drive.
/UpdatesDir O Specifies a path to look for updates after the installation is completed.
/DomainController O Allows you to specify the NetBIOS name or the FQDN of a domain controller.
/DoNotStartTransport O Tells Setup to not allow the transport service on a Hub Transport or Edge Transport server. This is useful during a recovery if you do not want messages to start flowing until you are sure the server is fully recovered.
/EnableErrorReporting O Configures Exchange Server to report errors automatically to Microsoft. All server roles can use this option. The default is not to enable this feature.

3. Command-Line Delegated Server Installation

In some large organizations, the person who is installing the Exchange servers may not have an account with sufficient Active Directory permissions to create the server objects in the Active Directory. For this reason, someone else may have to create the necessary server objects and the installer can then set up the servers.

Table 3. Exchange Server 2010 Delegated Setup Options
Option Optional (O) or Required (R) Explanation
/NewProvisionedServer O Creates a new provisioned server with the name specified on the command line, such as this: Setup.com/NewProvisionedServer:HNLMBX
/RemoveProvisionedServer O Removes a server that was previously configured with the /NewProvisionedServer option

 

This is where the delegated server installation is handy. The person with the necessary rights to set the servers up can “prestage” the servers in the Active Directory. Table 3 shows a list of the options available for delegated server setup.

4. Installing Language Packs

If you are supporting an Exchange 2010 Server for only English-speaking users and administrators, you do not need to worry about installing additional language packs. Exchange Server 2010 automatically includes the US English (en-US) messaging language pack (and it can’t be removed). Depending on your environment and users, you should know how to install additional language packs or Unified Messaging language packs.

Table 4 shows the valid options for installing language packs. Note that the Unified Messaging language pack options are only available on servers that already have the Unified Messaging role installed.

Table 4. Exchange Server 2010 Language Pack Options
Option Optional (O) or Required (R) Explanation
/AddUmLanguagePack O Adds the specified Unified Messaging language pack. You must specify the language pack name that you want to install; for French, you would use this command: Setup /AddUmLanguagePack:fr-fr
/RemoveUmLanguagePack O Removes the specified Unified Messaging language pack.
/SourceDir O Specifies the source folder for the Unified Messaging language pack.
/UpdatesDir O Specifies the path for updates for the Unified Messaging language pack.
/LanguagePack O Specifies the path to the language pack bundle. Must be used in conjunction with the /mode:install option.