Install Exchange 2010 in Unattended Mode

Applies to: Exchange Server 2010

You can use Setup from a Command Prompt window to install Microsoft Exchange Server 2010 in unattended mode. To perform an unattended setup, you must install Exchange 2010 from the command prompt.

Note

After you install any server roles on a computer running Exchange 2010, you can't use the Exchange 2010 Setup wizard to add any additional server roles to this computer. If you want to add more server roles to a computer, you must either use Add or Remove Programs from Control Panel or use Setup.com from a Command Prompt window.

For information about tasks to complete after installation, see Exchange 2010 Post-Installation Tasks.

Prerequisites

  • You must install both the Mailbox server role and the Hub Transport server role in each Active Directory site for e-mail messages to flow correctly.
  • You must install a Client Access server in each Active Directory site that has a Mailbox server role for client access to work correctly.
  • You can install the Mailbox server role, the Hub Transport server role, the Client Access server role, and the Unified Messaging (UM) server role on the same computer or on separate computers. You must install the Edge Transport server role on a separate computer in your organization's perimeter network.
  • You must ensure that each of the server roles meets the appropriate prerequisites and system requirements before you begin your installation:
  • You must ensure the account you use is delegated membership in the Schema Admins group if you haven't previously prepared the Active Directory schema. If you're installing the first Exchange 2010 server in the organization, the account you use must have membership in the Enterprise Admins group. If you've already prepared the schema and aren't installing the first Exchange 2010 server in the organization, the account you use must be a member of the Exchange 2010 Organization Management role group.
    Administrators who are members of the Delegated Setup role group can deploy Exchange 2010 servers that have been previously provisioned by a member of the Organization Management role group. For more information about delegated setup, see Provision Exchange 2010 Server and Delegate Setup. For more information about permissions, delegating roles, and the rights that are required to administer Exchange 2010, see Understanding Permissions.

Note

During Exchange 2010 installation, when preparing Active Directory, system mailboxes are created in the root domain that users and administrators can't log on to. These system mailboxes are created for Exchange 2010 features such as Message Approval and E-discovery.

Use Setup.com to install Exchange 2010 in unattended mode

  1. Log on to the server on which you want to install Exchange 2010.

  2. Insert the Exchange 2010 DVD into the DVD drive, and then, at the command prompt, navigate to the DVD drive, or navigate to the network location of the Exchange 2010 installation files.

  3. At the command prompt, run the applicable command for your organization.

    Setup.com [/mode:<setup mode>] [/role:<server roles to install>] [/OrganizationName:<name for the new Exchange organization>] [/TargetDir:<target directory>] [/SourceDir:<source directory>][/UpdatesDir:<directory from which to install updates>] [/DomainController:<FQDN of domain controller>] [/AnswerFile:<filename>] [/DoNotStartTransport] [/EnableLegacyOutlook] [/LegacyRoutingServer] [/EnableErrorReporting] [/NoSelfSignedCertificates] [/AdamLdapPort:<port>] [/AdamSslPort:<port>] [/LanguagePack:<language pack bundle>] [/AddUmLanguagePack:<UM language pack name>] [/RemoveUmLanguagePack:<UM language pack name>] [/NewProvisionedServer:<server>] [/RemoveProvisionedServer:<server>]
    
    • [/mode:<setup mode>, or /m:<setup mode>]
      You must use the /mode parameter to specify the setup mode. If you don't specify a mode, Setup uses the default Install mode. Select one of the following modes:
      Install   Use this mode to install a new Exchange 2010 server or to add server roles to an existing Exchange 2010 server.
      Uninstall   Use this mode without parameters to completely uninstall Exchange 2010 from a server. Or use this mode with the /roles parameter to remove specific server roles.
      RecoverServer   Use this mode to restore Exchange files and local configuration settings on a new server or on a server that experienced a disaster and has been rebuilt. Don't specify the roles to restore. Setup detects the Exchange Server object in Active Directory and installs the corresponding files and configuration automatically. After you recover the server, you can restore databases and reconfigure any additional settings.
      To run in RecoverServer mode, you can't have Exchange installed on the server. The Exchange Server object must exist in Active Directory. The recovered server must have the same name as the Exchange Server object in Active Directory.

    • [/roles:<server roles>, ** /role:<server roles>, or ** /r:<server roles>]
      You must use the /roles parameter to specify which server roles to install or uninstall. Select from one or more of the following roles, in a comma-separated list:
      ClientAccess (or CA, or C)
      EdgeTransport (or ET, or E)

      Note

      The Edge Transport server role can't coexist on the same computer with any other server role. You must deploy the Edge Transport server role in the perimeter network and outside the Active Directory forest.

      HubTransport (or HT, or H)
      Mailbox (or MB, or M)
      UnifiedMessaging (or UM, or U)
      ManagementTools (or MT, or T)

      Note

      If you select ManagementTools, you'll install the EMC and the Exchange cmdlets for the Exchange Management Shell. The management tools will be installed automatically if you install any other server role.

      For example, to specify the Client Access and Mailbox server roles, specify the following: Setup.com /roles:ClientAccess,Mailbox or alternatively, specify the following: Setup.com /r:C,M.

    • [/OrganizationName:<organization name>, or /on:<organization name>]
      Use the /OrganizationName parameter to specify the name to give the new Exchange organization. This parameter is required if you're installing the first server in an organization, and you haven't run Setup /PrepareAD. If you're installing a server in an existing Exchange organization or if you've already run Setup /PrepareAD, you can't use this parameter.

      Note

      In the Exchange 2010 Setup wizard, the default value is First Organization. In the command-line version of Setup, there is no default value.

      The Exchange organization name can contain only the following characters:
      A through Z
      a through z
      0 through 9
      Space (not leading or trailing)
      Hyphen or dash
      The organization name can't contain more than 64 characters. The organization name can't be blank. If the organization name contains spaces, you must enclose it in quotation marks (").

    • [/TargetDir:<destination folder>, or /t:<destination folder>]
      Use the /TargetDir parameter to specify the location to install Exchange 2010 files. The default location is Program Files\Microsoft\Exchange Server. You can't install Exchange 2010 to a root directory such as C:\. You can't install Exchange 2010 on a ROM drive, RAM disk, network drive, removable disk, or unknown drive type. You can't change the installation directory if Exchange is already installed on the server (for example, if you're adding a server role). If the destination folder contains spaces, you must enclose it in quotation marks (").

    • [/SourceDir:<source folder>, or /s:<source folder>]
      Use the /SourceDir parameter to specify the location from which to install Exchange 2010 files when you're adding a server role to an existing Exchange 2010 server and if the source folder isn't the folder from which you're running Setup. The default value is the current directory from which you're running Setup. If the source folder contains spaces, you must enclose it in quotation marks (").

    • [/UpdatesDir:<updates folder>, or /u:<updates folder>]
      Use the /UpdatesDir parameter to specify the directory from which updates will be installed. If the updates folder contains spaces, you must enclose it in quotation marks ("). Files in the Updates directory must be either an Updates.exe file, or one or more *.msp files. Setup will install the updates before installing the Exchange server roles specified.
      By default, Setup uses the Updates folder that's in the root folder of the installation media. If you want Setup to search for updates in a different folder instead of in the default Updates folder, use this parameter. You can specify only one folder for updates.

    • [/DomainController:<FQDN of domain controller>, or /dc:<FQDN of domain controller>]

    • Use the /DomainController parameter to specify the domain controller to use to read from and write to Active Directory during setup. You can use NetBIOS or fully qualified domain name (FQDN) format. The domain controller that you specify must be in the same Active Directory site as the server on which you run Setup and must meet the following requirements: Windows Server 2003 Standard Edition with SP1 or later (32-bit or 64-bit), or Windows Server 2003 Enterprise Edition with SP1 or later (32-bit or 64-bit), or Windows Server 2008 Standard or Enterprise (32-bit or 64-bit), or Windows Server 2008 R2 Standard or Enterprise, or Windows Server 2008 Datacenter or R2 Datacenter. If you don't use this parameter, Setup will select a domain controller to use.
      To run Setup /PrepareSchema or Setup /PrepareAD, or to install the first Exchange 2010 server in an organization if you haven't run Setup /PrepareAD, Setup must use the schema master domain controller to read from and write to Active Directory. If you specify a domain controller that isn't the schema master, Setup will stop and return an error message.

    • [/AnswerFile:<filename>, or /a:<filename>]
      Use the /AnswerFile parameter to specify the location of a file that contains parameters for Setup. You can use this file to install Exchange 2010 on multiple computers with the same parameters. You can use the following parameters in the answer file: EnableLegacyOutlook, LegacyRoutingServer, ServerAdmin, OrganizationName, DoNotStartTransport, UpdatesDir, EnableErrorReporting, NoSelfSignedCertificates, AdamLdapPort, and AdamSslPort.

      Note

      Don't include the slash mark (/) with the parameters in the answer file.

      The following is an example of the contents in the answer file AnswerFile01.txt.

      EnableErrorReporting
      UpdatesDir=C:\Exchange2010_Updates
      

      The following is an example of the Setup command to use this answer file.

      Setup.com /Mode:Install /Roles:Mailbox /AnswerFile:C:\AnswerFile01.txt
      
    • [/DoNotStartTransport]
      Use the /DoNotStartTransport parameter to specify that the Microsoft Exchange Transport service won't start when Setup completes. By default, Setup starts the Microsoft Exchange Transport service after installing either the Hub Transport or Edge Transport server role. If you need to do additional configuration before the Edge Transport or Hub Transport server accepts e-mail messages, for example, configuring anti-spam agents, you should use this parameter. We recommend that you use this parameter when you use the /RecoverServer parameter to recover a Hub Transport or Edge Transport server so that you can move the queue database from the failed server to the correct location on the new server before starting the Microsoft Exchange Transport service.

      Note

      The Microsoft Exchange Transport service runs only on the Hub Transport and Edge Transport server roles.

    • [/EnableLegacyOutlook]
      Use the /EnableLegacyOutlook parameter to specify that you have client computers that are running Microsoft Outlook 2003 or earlier. Exchange 2010 will create a public folder database on the Mailbox server. If all of your client computers are running Office Outlook 2007, public folders are optional in Exchange 2010. If you don't use this parameter, Exchange 2010 won't create a public folder database on the Mailbox server. You can add a public folder database later.
      You can only use this parameter if you're installing the first Mailbox server in an organization.
      When you install the first Mailbox server in an existing Exchange Server 2003 organization, by default, Setup will create the public folder database on the Exchange 2010 server. You don't need to specify this parameter. Setup won't create a public folder database on subsequent Mailbox server installations in this organization.

    • [/LegacyRoutingServer]
      Use the /LegacyRoutingServer parameter to specify an Exchange 2003 bridgehead server that's located in the routing group to which you'll create the initial routing group connector. A routing group connector is required for mail flow between Exchange 2010 and Exchange 2003 when these Exchange server versions coexist in the same organization.
      You can use this parameter only if you're installing the first Hub Transport server in the organization and if you have Exchange 2003 servers in the existing organization. In this scenario, this parameter is required to establish mail flow between Exchange 2010 and Exchange 2003.

    • [/EnableErrorReporting]
      Use the /EnableErrorReporting parameter to enable error reporting during Setup. If you decide to enable error reporting, the Microsoft Error Reporting Service collects information about how you use Exchange 2010 and about any issues you may encounter. This information is used to help Microsoft diagnose problems and provide solutions.
      You can use this parameter only if you're running Setup in Install mode.
      If you enable error reporting, Setup sets the following registry key to 0:
      HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ExchangeServer\E14\DisableErrorReporting
      By default, this registry key is set to 1 and error reporting is disabled.

    • [/NoSelfSignedCertificates]
      Use the /NoSelfSignedCertificates parameter if you don't want Setup to create self-signed certificates in the case where no other valid certificate is found for Secure Sockets Layer (SSL) or Transport Layer Security (TLS) sessions. If you don't have a certificate, communication between clients and the Client Access or Unified Messaging server will be unencrypted.
      You can only use this parameter if you're installing either the Client Access server role or the Unified Messaging server role.

    • [/AdamLdapPort:<port>]
      Use the /AdamLdapPort parameter to specify the LDAP port to use for the Edge Transport server role Active Directory Lightweight Directory Services (AD LDS) instance. The default value is 50389. Exchange stores the ADAM LDAP port in the following registry key:
      HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ExchangeServer\v14\EdgeTransportRole\AdamSettings\MSExchangeAdam\LdapPort
      You can use this parameter only if you're installing the Edge Transport server role.

    • [/AdamSslPort:<port>]
      Use the /AdamSslPort parameter to specify the SSL port to use for the Edge Transport server role AD LDS instance. You can specify any valid unused port number. The default value is 50636. Exchange stores the Active Directory Lightweight Directory Services (AD LDS) SSL port in the following registry key:
      HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ExchangeServer\v14\EdgeTransportRole\AdamSettings\MsExchangeAdam\SslPort
      You can use this parameter only if you're installing the Edge Transport server role.

    • [/LanguagePack:<path to language pack bundle> or /lp:<path to language pack bundle>]
      Use the /LanguagePack parameter to specify an Exchange language pack that you want to add. For more information, see Exchange 2010 Language Support.

    • [/AddUmLanguagePack:<UM language pack name>]
      Use the /AddUmLanguagePack parameter to specify a UM language pack that you want to add. If you add a UM language pack, callers and Outlook Voice Access users can interact with the UM system in another language. For a list of Unified Messaging languages, see Client Language Support for Unified Messaging.
      To install a UM language pack, the Unified Messaging server role must already be installed.
      When you add a language pack, by default, Setup expects the language pack .msi file to be in the ServerRoles\UnifiedMessaging directory of the installation directory. To specify a different location, use the /SourceDir parameter.

      Note

      Don't include "umlang-" or the .msi extension in the language pack name. For example, the German language pack is umlang-de-DE.msi. To install this language pack, run the following command: Setup.com /AddUmLanguagePack:de-DE

      Note

      You can't install a language pack by running the language pack .msi file. You must use Setup.com to install the language pack.

    • [/RemoveUmLanguagePack:<UM language pack name>]
      Use the /RemoveUmLanguagePack parameter to specify a Unified Messaging language pack that you want to remove.

      Note

      Don't include "umlang-" or the .msi extension in the language pack name. For example, the German language pack is umlang-de-DE.msi. To remove this language pack, run the following command: Setup.com /RemoveUmLanguagePack:de-DE

      Note

      You can't remove a language pack by running the language pack .msi file. You must use Setup.com to remove the language pack.

    • [/NewProvisionedServer:<server name>, or /nprs:<server name>]
      Use the /NewProvisionedServer parameter to create a placeholder server object in Active Directory so that you can delegate the setup of a server. If you provide permissions to this server object for a user who has Exchange Server Administrators role permissions, that user can install Exchange 2010 on the server. During Setup, additional attributes on this server object will be added. If you don't specify a server name, Setup.com will create a placeholder server object in Active Directory for the local server. You can use the /ServerAdmin parameter with the /NewProvisionedServer parameter to specify the user or group that will have permissions to the provisioned server.
      To run Setup.com with the /NewProvisionedServer parameter, you must be a member of the Exchange 2010 Organization Management role group, you must have an existing Exchange organization in Active Directory, and you must have at least one Exchange 2010 server installed in the organization. The server that you specify must have a machine account in Active Directory.
      After you provision a server with the /NewProvisionedServer parameter, you can view the server in the EMC or in the results of the Get-ExchangeServer cmdlet.

    • [/RemoveProvisionedServer:<server name>, or /rprs:<server name>]
      Use the /RemoveProvisionedServer parameter to remove a placeholder server object that was created using the NewProvisionedServer parameter. You can remove the server object at any time before you install Exchange 2010 on that server. After you install Exchange 2010, you can't use this parameter to remove the server object. You can use this parameter only to remove a provisioned server object. If you run Setup.com with the /RemoveProvisionedServer parameter on a server that has Exchange 2010 installed, Setup.com will complete successfully, but the server object won't be removed.
      If you don't specify a server name, Setup.com will remove the placeholder server object in Active Directory that has the same name as the local server.
      To run Setup.com with the /RemoveProvisionedServer parameter, you must be a member of the Exchange Organization Management role group.

    • [/?]
      Use the /? parameter to display Help for the Setup.com command.

  4. Setup copies the setup files locally to the computer on which you're installing Exchange 2010.

  5. Setup checks the prerequisites, including all prerequisites specific to the server roles that you're installing. If you haven't met all of the prerequisites, Setup fails and returns an error message that explains the reason for the failure. If you've met all the prerequisites, Setup installs Exchange 2010.

  6. Verify that the installation completed successfully. For more information, see Verify an Exchange 2010 Installation.

Examples

The following are examples of using Setup.com:

  • Setup.com /mode:Install /role:Mailbox,HubTransport /TargetDir:"C:\Exchange 2010"
    This command installs the Mailbox server role, the Hub Transport server role, and the management tools to the C:\Exchange 2010 directory.
  • Setup.com /r:M,C,U
    This command installs the Mailbox server role, Client Access server role, Unified Messaging server role, and the management tools.
  • Setup.com /mode:Uninstall /role:HT
    This command removes the Hub Transport server role from the server.
  • Setup.com /mode:Uninstall
    This command completely removes Exchange 2010 from the server and removes this server's Exchange configuration from Active Directory.
  • Setup.com /mode:Install /role:Mailbox,HubTransport /OrganizationName:MyOrg
    This command creates an Exchange organization in Active Directory called MyOrg and also installs the Mailbox server role, Hub Transport server role, and the management tools.
  • Setup.com /PrepareAD /on:"My Org"
    This command creates an Exchange organization called My Org and prepares Active Directory for Exchange 2010.
  • C:\Exchange2010\bin\Setup.com /m:Install /r:C /SourceDir:d:\amd64
    This command adds the Client Access server role to an existing Exchange 2010 server using D:\amd64 as the source directory.
  • Setup.com /role:Mailbox,HubTransport /UpdatesDir:"C:\Exchange2010\New Patches"
    This command updates ExchangeServer.msi with patches from the specified directory, and then installs the Mailbox server role, Hub Transport server role, and the management tools.
  • Setup.com /mode:Install /role:Mailbox,HubTransport /DomainController:DC01
    This command uses the domain controller DC01 to query and make changes to Active Directory while installing the Mailbox server role, Hub Transport server role, and the management tools.
  • Setup.com /mode:Install /role:Mailbox /AnswerFile:c:\ExchangeConfig.txt
    This command installs the Mailbox server role by using the settings in the ExchangeConfig.txt file.
  • Setup.com /mode:Install /role:EdgeTranport /DoNotStartTransport
    This command installs the Edge Transport server role and the management tools. After installation, Exchange doesn't start the Microsoft Exchange Transport service.
  • Setup.com /mode:Install /role:Mailbox,HubTransport /TargetDir:"C:\Exchange2010" /EnableLegacyOutlook
    This command installs the Mailbox server role, Hub Transport server role, and the management tools into the C:\Exchange2010 directory. This command also creates a public folder database on the Mailbox server.
  • Setup.com /mode:Install /role:Mailbox,HubTransport /TargetDir:"C:\Exchange2010" /LegacyRoutingServer:Ex2003.contoso.com
    This command installs the Mailbox server role, Hub Transport server role, and the management tools into the C:\Exchange2010 directory. This command also creates a routing group connector from the Hub Transport server to the specified legacy Exchange server, and creates a routing group connector from the legacy Exchange server to the Hub Transport server.
  • Setup.com /mode:Install /role:Mailbox,HubTransport /EnableErrorReporting
    This command installs the Mailbox server role, Hub Transport server role, and the management tools. This command also enables error reporting.
  • Setup.com /mode:Install /role:ClientAccess /NoSelfSignedCertificates
    This command installs the Client Access server role and the management tools and doesn't create a self-signed certificate.
  • Setup.com /r:ET /AdamLdapPort:50390 /AdamSslPort:50640
    This command installs the Edge Transport server role and the management tools and configures the Active Directory Lightweight Directory Services (AD LDS) instance to use port 50390 for LDAP and port 50640 for SSL.
  • Setup.com /NewProvisionedServer:Exchange03 /ServerAdmin:Contoso\Gerhard
    This command creates an Exchange Server object in Active Directory called Exchange03 and adds Contoso\Gerhard as an Exchange Server Administrator for the server Exchange03.
  • Setup.com /rprs:Exchange03
    This command removes the object Exchange03 from Active Directory.
  • Setup.com /mode:Install /languagepack:<"C:ExchangeLanguagePack"> /role:Mailbox,HubTransport
    This command installs the language pack bundle and the Mailbox and Hub Transport server roles.
  • Setup.com /AddUmLanguagePack:ko-KR
    This command installs the Korean Unified Messaging language pack from the %ExchangeSourceDir%\ServerRoles\UnifiedMessaging directory.