Installing and configuring Exchange 2007 from the command line utility - Part 1

This two-part series will show you how to install Exchange 2007 on a Windows 2008 server.

Nathan Winters

Network Administration - This two-part series will show you how to install Exchange 2007 on a Windows 2008 server. However, the difference with the other articles here is that the installation will be done entirely. from the command line utility. Because there are many previous articles, we have talked a lot about installing Exchange 2007 so in this article we will not cover each step in detail but instead focus on the necessary steps of the command line utility.

When a basic installation is done, I will show you how to make the server work.

In the relevant sections, we will extend the method used to discuss how methods can be used in a wider setting. Introduce you on how to use it as a demonstration document and DR. We will also give you some information about other areas as part of configuring an Exchange 2007 system.

Introduce

With the presence of PowerShell, Exchange 2007 is the first version of Exchange that can easily work from the command line utility. However, before working with Exchange, we have to install it. How to install from the command line utility is quite simple, but before that we need to prepare some necessary steps.

Before we get started, we'll explain a little about your lab environment. The environment we tested includes a domain root called Gaots.co.uk and a 'child' domain called Child.gaots.co.uk. Each domain has its own domain controller. Only one service in the root domain is the Enterprise Root CA. In the 'Child' domain, Exchange 2003 is running on a Windows Server 2003 computer. Figure 1 below shows details about our lab environment.

Installing and configuring Exchange 2007 from the command line utility - Part 1 Picture 1Installing and configuring Exchange 2007 from the command line utility - Part 1 Picture 1
Figure 1: Lab environment

The preparation

The steps below are not really necessary but are things that we should prepare before deploying Exchange 2007.

  1. Verify the minimum domain is located in Windows 2000 Native Mode

  2. Verify that the Exchange 2003 organization is in Native Mode

  3. Build the host operating system to standardize the specifications and 'join' to the domain

  4. Install the Exchange 2007 prerequisites according to the links below:

    1. System requirements for Exchange 2007

    2. How to install Exchange 2007 SP1 prerequisites on Windows Server 2008 or Windows Vista

It is necessary to have two components to prepare for Exchange 2007: Active Directory preparation of software prerequisites on the Exchange server. We will prepare AD on the domain controller in a Root domain as mentioned above.

To prepare for the installation of Exchange 2007 on Windows Server 2008 systems, we must first install PowerShell using the following command:

ServerManagerCmd -i PowerShell
Next, the IIS components below also need to be installed:
ServerManagerCmd -i Web-Server
ServerManagerCmd -i Web-ISAPI-Ext
ServerManagerCmd -i Web-Metabase
ServerManagerCmd -i Web-Lgcy-Mgmt-Console
ServerManagerCmd -i Web-Basic-Auth
ServerManagerCmd -i Web-Digest-Auth
ServerManagerCmd -i Web-Windows-Auth
ServerManagerCmd -i Web-Dyn-Compression

If you need assistance for users of Outlook Anywhere on your server, you need to install RPC components on HTTP proxies using the following command:

ServerManagerCmd -i RPC-over-HTTP-proxy

All of these steps need to be done from the standard Windows command line utility and included in the same .bat file to avoid you having to type in each one.

  1. Upgrade the server with Microsoft Update.

  2. Create OU for Exchange server objects in AD (OUs can be used for Group Policy specifically related to Exchange servers)

  3. Transfer server accounts to the correct OU.

  4. Create Exchange Full Administrator Account (this is the account that will install exchange).

  5. To prepare AD, you need some Domain, Enterprise and Schema Administrator permissions and where Exchange 2003 exists, create an account and Exchange 2003 Full Administrator. To install Exchange in the 'child' domain you need to be inside an Exchange Organization Administrator or Enterprise Administrator.

  6. Copy the installation files to each server - c: softwareExchange2007.

  7. Create upgrade folders on each server - c: softwareExchange2007Patches.

  8. Copy the latest upgrade to update the newly created folder.

  9. If not, create an Internal Certificate Authority of the Enterprise Root. This is used to provide certificates for secure internal access for Exchange.

  10. Where Exchange 2003 exists Implement Link State suppression to avoid routing repetition.

  11. When making a big change to the environment, now is the time to get the job done. We must consider approved email domains and recipient policies and make sure you don't have unnecessary things.

  12. Create a final validation of the machine build, including: network configuration, patching, IE version and prerequisites.

  13. Run the Exchange Best Practice Analyzer (ExBPA) Readiness Assessment and focus on any issues that may arise.

Setting

After having completed all the steps in the preconditions above, we are ready to move to the actual Exchange 2007 server deployment. The first step is to prepare AD for Exchange 2007. In the environment Our lab, we do this on root DC by running the following commands from the Windows command prompt:

Setup.com / PrepareAD
The Setup.com / PrepareAllDomains

Once you've done the AD preparation and make sure AD has been fully replicated, let's install Exchange.

Note:

The whole script from here can run completely separate in the PowerShell window or sequentially by saving them to a text file with the extension .PS1.

Before running the script below, you need to enable the ability to run scripts on the server. As long as you create scripts on the server where you will run them, the following settings are suggested to maintain PowerShell security. Run the command to set the execution policy for RemoteSigned.

Set-ExecutionPolicy RemoteSigned
Now we can start installing Exchange by running the script below:
#First Create the install directory
New-Item -Type directory -Path "C: Program FilesMicrosoftExchange Server"
#Run Setup
C: softwareexchange2007Setup.com
/ mode: install / roles: "ClientAccess, HubTransport, Mailbox"
/ TargetDir: "C: Program FilesMicrosoftExchange Server"
/ SourceDir: C: SoftwareExchange2007 / EnableErrorReporting
/LegacyRoutingServer:Exch2003.child.gaots.co.uk
/ UpdatesDir: C: SoftwareExchange2007Patches

Let's examine the above command carefully by running the Exchange command installation program (Setup.com) from the software directory, where we copied the installation files.

Note:

The first Exchange 2007 server installed will use a slightly different scenario for other servers because you have to specify the Legacy Routing Server, which allows installation to create the first Routing Group Connector to link routing groups. Exchange 2003 and 2007.

After you have installed Exchange 2007, you need to scan Microsoft Update to make sure that the server is fully patched before restarting.

After booting, you need to check the event logs and settings to make sure that the installation has been completed. The first thing to check is to run the Get-ExchangeServer command from the Exchange Management Shell. This will return a list of Exchange servers with installed roles. Check that all the roles you plan to install are listed and then switch to another.

Next check the installation logs. The main installation log file will check the progress of each task performed during the installation and configuration of Exchange 2007. This file will contain information about the status of the prerequisites and the tests. 'system-readiness' has been executed before the installation starts, the application installation process and configuration changes are made to the system. This file is located at the link below:

ExchangeSetupLogsExchangeSetup.log

Along with the above log file is the ExchangeSetup.msilog file, which is a file that contains information about compressing the Exchange 2007 code from the installer file.

ExchangeSetupLogsExchangeSetup.msilog

To parse the log files of errors that appear, you can open them with notepad and find out. However, because this article only talks about using the command line, so let's focus on that. Microsoft has released an Exchange script to use for this issue, which is located in the scripts folder in the Exchange installation directory. Open Exchange Management Shell, change the directory to the scripts folder and run the following command:

Get-SetupLog c: exchangesetuplogsexchangesetup.log - error -tree

This will create a list of the errors and warnings that were recorded during the installation process and show the results in a tree format.

The final step is to run the Exchange Best Practice Analyzer to allow you to get a full view of the health of the Exchange organisation.

Until now the installation has been completed and verified, from here we can switch to the server configuration, which will be introduced in Part 2 of this article.

Conclude

In this article, I have shown you the steps needed to install Exchange and start the installation process by preparing AD from the command line. Then I installed Exchange 2007 with the roles: Hub, CAS and Mailbox and verified that the installation was successful. In the second part of this article series, I will show you the commands needed to configure some of the other components of Exchange 2007 to serve the user's needs.

4 ★ | 1 Vote