Exchange Server 2016 – Installation using unattended mode via PowerShell

After you have installed all the Exchange Server 2016 Pre-Requisites, you are ready to install Exchange Server 2016 in your organization.

Before you can install Exchange Server 2016, make sure that user installing the Exchange Server should have following rights:

  1. Verify all Pre-Requisities are installed.
  2. Enterprise Admin
  3. Schema Admin
  4. Exchange Organization role group membership (This is required if AD Schema is already prepared or if you have installing the second or more Exchange Servers.)

You can install using the Setup wizard or unattended mode via PowerShell. To do so:

  1. Log in to Server where you would like to install Exchange Server 2016.
  2. Open Powershell and run the following command

    .\setup.exe /Mode:Install /Role:Mailbox /IAcceptExchangeServerLicenseTerms

exchange-install-unattended-02

exchcnge-install-unattended-01

This command installs the Mailbox server role and the management tools in the default installation location.

Exchange Server setup allows various switches to be used during installation.

Setup.exe [/Mode:<setup mode>] [/IAcceptExchangeServerLicenseTerms]
[/Role:<server role to install>] [/InstallWindowsComponents] 
[/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>] [/DisableAMFiltering]
[/AnswerFile:<filename>] [/DoNotStartTransport] 
[/EnableErrorReporting] [/CustomerFeedbackEnabled:<True | False>] 
[/AddUmLanguagePack:<UM language pack name>] 
[/RemoveUmLanguagePack:<UM language pack name>] 
[/NewProvisionedServer:<server>] [/RemoveProvisionedServer:<server>] 
[/MdbName:<mailbox database name>] [/DbFilePath:<Edb file path>] 
[/LogFolderPath:<log folder path>] [/ActiveDirectorySplitPermissions:<True | False>]
[/TenantOrganizationConfig:<path>]

For complete list of commands and examples, visit here

The following are examples of using Setup.exe:

  • Setup.exe /mode:Install /role:Mailbox /OrganizationName:MyOrg /IAcceptExchangeServerLicenseTermsThis command creates an Exchange 2016 organization in Active Directory called MyOrg, installs the Mailbox server role and the management tools, and also accepts the Exchange 2016 licensing terms.
  • Setup.exe /mode:Install /role:Mailbox /TargetDir:”C:\Exchange Server” /IAcceptExchangeServerLicenseTermsThis command installs the Mailbox server role and the management tools in the “C:\Exchange Server” directory. This command assumes an Exchange 2016 organization has already been prepared.
  • Setup.exe /mode:Install /r:MB /IAcceptExchangeServerLicenseTermsThis command installs the Mailbox server role and the management tools in the default installation location.
  • Setup.exe /mode:Install /r:EdgeTransport /IAcceptExchangeServerLicenseTermsThis command installs the Edge Transport server role and the management tools in the default installation location.
  • Setup.exe /mode:Install /r:ET /IAcceptExchangeServerLicenseTermsThis command installs the Edge Transport server role and the management tools in the default installation location.
  • Setup.exe /mode:Uninstall /IAcceptExchangeServerLicenseTermsThis command completely removes Exchange 2016 from the server and removes this server’s Exchange configuration from Active Directory.
  • Setup.exe /PrepareAD /on:”My Org” /IAcceptExchangeServerLicenseTermsThis command creates an Exchange organization called My Org and prepares Active Directory for Exchange 2016.
  • Setup.exe /role:Mailbox /UpdatesDir:”C:\ExchangeServer\New Patches” /IAcceptExchangeServerLicenseTermsThis command updates ExchangeServer.msi with patches from the specified directory, and then installs the Mailbox server role and the management tools. If a language pack bundle is included in this directory, the language pack is also installed.
  • Setup.exe /mode:Install /role:Mailbox /DomainController:DC01 /IAcceptExchangeServerLicenseTermsThis command uses the domain controller DC01 to query and make changes to Active Directory while installing Mailbox server role and the management tools.
  • Setup.exe /mode:Install /role:Mailbox /AnswerFile:c:\ExchangeConfig.txt /IAcceptExchangeServerLicenseTermsThis command installs the Mailbox server role by using the settings in the ExchangeConfig.txt file.
  • Setup.exe /rprs:Exchange03 /IAcceptExchangeServerLicenseTermsThis command removes the object Exchange03 from Active Directory.
  • Setup.exe /AddUmLanguagePack:ko-KR /IAcceptExchangeServerLicenseTermsThis command installs the Korean Unified Messaging language pack from the %ExchangeSourceDir%\ServerRoles\UnifiedMessaging directory

 

This completes the installation of Exchange Server 2016.

Setup will warn you about any errors and You can verify the installation by following methods:

  1. Run PowerShell command to get Exchange Server. If Exchange is installed properly then it will show up in Get-ExchangeServer cmdlet
    1. Get-ExchangeServer cmdlet
  2. Review the Setup log file <system drive>\ExchangeSetupLogs\ExchangeSetup.log. for any errors

    exchnage-postinstall-06
    exchnage-postinstall-07

    1. Verify that all Microsoft Services are running
      exchnage-postinstall-09exchnage-postinstall-08

This is the easy part of installing. we still need to configure the Exchange Server 2016 properly

Now you need to run the post installation setup tasks to configure mail flow, Subscribing Edge servers, spam agents and management tools etc.

Stay tuned for next blogs on Post installation steps.

 

Reference : https://technet.microsoft.com/en-us/library/aa997281(v=exchg.160).aspx

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s