Install Exchange 2013 (SP1) on Windows Server 2012 R2

Exchange 2013  SP1 was released in February this year providing support for Windows Server 2012 R2. In this blog we’ll run through the installation process.

The demo environment I am using includes a Windows Server 2012 R2 domain controller and a Server 2012 R2 member server.

In the demo environment no previous versions of Exchange have been installed so as part of the installation the Exchange 2013 SP1 we will upgrade the AD Schema, even if you are running Exchange 2013, the installation of SP1 requires a Schema update. Note in this scenario we are going to jump straight to installing Exchange 2013 SP1, without installing Exchange 2013 first.

Finally before we start, always test in a demo environment before deploying in Production!

I hope this walk through helps.

Praveen,
CartelNetwork

1. On your 2012 R2 member server, download Exchange 2013 SP1, see here for the latest version here. Note: check for the latest cumulative Update and install directly from that to save you patching the install of SP1 once complete, currently the latest is CU11 released on 15/12/2015.

2. Once downloaded extract the files by running the Exchange 2013-x64-SP1 executable. In my environment I have extracted them to C:\Sw\Exchange2013SP1.

3. On a Server 2012 R2 member server, run PowerShell as Administrator.

PowerShell Run as Administrator

4. Run the following command to install the Active Directory Remote Administration Tool (Source: Exchange 2013 Prerequisites)

Install-WindowsFeature RSAT-ADDS

Install-WindowsFeature RSAT-ADDS

5. In the same PowerShell Window run the following command to prepare the server for the Mailbox or CAS server roles (Source: Exchange 2013 Prerequisites):

Install-WindowsFeature AS-HTTP-Activation, Desktop-Experience, NET-Framework-45-Features, RPC-over-HTTP-proxy, RSAT-Clustering, RSAT-Clustering-CmdInterface, RSAT-Clustering-Mgmt, RSAT-Clustering-PowerShell, Web-Mgmt-Console, WAS-Process-Model, Web-Asp-Net45, Web-Basic-Auth, Web-Client-Auth, Web-Digest-Auth, Web-Dir-Browsing, Web-Dyn-Compression, Web-Http-Errors, Web-Http-Logging, Web-Http-Redirect, Web-Http-Tracing, Web-ISAPI-Ext, Web-ISAPI-Filter, Web-Lgcy-Mgmt-Console, Web-Metabase, Web-Mgmt-Console, Web-Mgmt-Service, Web-Net-Ext45, Web-Request-Monitor, Web-Server, Web-Stat-Compression, Web-Static-Content, Web-Windows-Auth, Web-WMI, Windows-Identity-Foundation

Install-WindowsFeature for Exchanfe Mailbox and CAS Roles

6. Reboot the server to complete the installation of the Windows Features.

7. Download and install Microsoft Unified Communications Managed API 4.0, Core Runtime 64-bit (Source: Exchange 2013 Prerequisites).

Microsoft Unified Communications Managed API 4.0 RuntimeMicrosoft Unified Communications Managed API 4.0 Runtime 1Microsoft Unified Communications Managed API 4.0 Runtime 2Microsoft Unified Communications Managed API 4.0 Runtime 3Microsoft Unified Communications Managed API 4.0 Runtime 4

8. On the 2012 R2 member server, run Cmd as Administrator.

Run CMD as Administrator

9. Now let’s prepare the domain for Exchange 2013 SP1. Go to the location where you extracted Exchange 2013 SP1 installation files (C:\Sw\Exch2013SP1).

First run setup.exe /help to list the help options available to you.

Exchange 2013 SP1 Setup help

As this is the first Exchange Server in our environment we need to prepare the topology so next run setup.exe /help:preparetopology.

Exchange 2013 SP1 setup help preparetopology

The three commands we are interested in are the /PrepareSchema, /PrepareAD, /PrepareDomain, but as this is a new installation we’ll also need to use the /OrganizationName switch

10. So let’s run the first command:

Setup.exe /PrepareSchema

iacceptexchangeserverlicenseterms warning messageYou’ll see without adding the additional switch /IAcceptExchangeServerLicenseTerms we get a warning and the installation goes no further.

So let’s run the first command in full:

Setup.exe /PrepareSchema /IAcceptExchangeServerLicenseTerms

setup prepareschema iacceptexchangeserverlicenseterms 1setup prepareschema iacceptexchangeserverlicenseterms 2setup prepareschema iacceptexchangeserverlicenseterms 3

11. Now we run Setup /PrepareAD with the /OrganizationName paramter as this is a new Exchange installation:

Setup.exe /PrepareAD /OrganizationName:OxfordSBSGuy /IAcceptExchangeServerLicenseTerms

exchange 2013 sp1 setup preparead organizationname oxfordsbsguy iacceptexchangeserverlicenseterms 1exchange 2013 sp1 setup preparead organizationname oxfordsbsguy iacceptexchangeserverlicenseterms 2exchange 2013 sp1 setup preparead organizationname oxfordsbsguy iacceptexchangeserverlicenseterms 3

12. Finally the last command we run is to prepare the domain, note in a multi domain environment there is the option to use /PrepareAllDomains:

Setup.exe /PrepareDomain /IAcceptExchangeServerLicenseTerms

exchange 2013 sp1 setup preparedomain iacceptexchangeserverlicenseterms 1exchange 2013 sp1 setup preparedomain iacceptexchangeserverlicenseterms 2

13. Now type Setup.exe and hit return. Click Next to check for updates.

Exchange 2013 Setup - Check for Updates14. Click Next.

Exchange 2013 Setup - No updates found

Exchange 2013 Setup - Copying Files

Exchange 2013 Setup - Initializing Setup15. Read the Introduction and click Next.

Exchange 2013 Setup - Introduction16. Accept the license agreement and click Next.

Exchange 2013 Setup - License Agreement17. User recommended settings, click Next.

Exchange 2013 Setup - Recommended Settings18. Select the server roles you require, for my test lab I am selecting Mailbox and  the Client Access roles, click Next.

Exchange 2013 Setup - Server Role Selection19. Choose a location to install, click Next.

Exchange 2013 Setup - Installation Space and Location20. Choose Malware settings and click Next.

Exchange 2013 Setup - Malware Protection Settings21. Once the readiness check has completed click Install.

Exchange 2013 Setup - Readiness Checks

Exchange 2013 Setup - Setu Progress

22. Tick the box to Launch the Exchange Administration Center, and click Finish. Exchange 2013 Setup - Setup CompleteYou have successfully installed Exchange 2013.

Now Exchange 2013 has been installed check out the multi-part series on Exchange 2013 Initial Configuration Settings.

Source Material:

  1. Technet Exchange 2013 Prerequisites
  2. Technet Exchange 2013 System Requirements
  3. Released: Exchange Server 2013 Service Pack 1
  4. Technet Prepare Active Directory and Domains
  5. The Exchange Guy – Preparing Active Directory and Schema for Exchange 2013 Release Preview

Related Posts:

1. Exchange 2013 Initial Configuration Settings multi-part series

2. Exchange Server and Update Rollups Build Numbers

3. Exchange 2010 SP3 Update Rollup 12 released and installation tips

4. Exchange PowerShell: How to list all SMTP email addresses in Exchange

5. Exchange PowerShell: How to enumerate Distribution Lists, managers and members

Windows Deployment Server Modifications Syslinux

To make this possible, alter WDS to serve up a PXELinux menu with options to either proceed with WDS or jump over to a Linux PXE server:

  • Download Syslinux 3.86and extract to a temporary location
  • Copy the following three files directly to your WDS x64 boot directory, e.g., D:\RemoteInstall\Boot\x64\
    • core\pxelinux.0
    • modules\pxechain.com
    • com32\menu\menu.c32
  • Make duplicate copies of these existing WDS files (should already be present in directory above); they need to have “zero” as the extension
    • n12 -> pxeboot.0
    • com -> abortpxe.0
  • Create a directory in x64 named “pxelinux.cfg”
  • Create a new text file: x64\pxelinux.cfg\default with the following as a guide:

DEFAULT menu.c32

MENU TITLE WDS PXE Server

 

LABEL wds

MENU DEFAULT

MENU LABEL Windows Deployment Services

KERNEL pxeboot.0

 

LABEL abort

MENU LABEL Abort PXE

Kernel   abortpxe.0

 

LABEL linuxpxe

MENU LABEL Linux PXE server…

KERNEL pxechain.com

APPEND 192.168.4.33::pxelinux.0

#IP address above is Linux PXE host

To activate, run these two commands from a command prompt on the WDS server:

wdsutil /set-server /bootprogram:boot\x64\pxelinux.0 /architecture:x64

wdsutil /set-server /N12bootprogram:boot\x64\pxelinux.0 /architecture:x64

Action!

Boot a machine from the network and you should get a PXELinux menu that offers a choice:

One other note: the Linux PXE server doesn’t actually need to be on the same network, it just needs to be reachable from the client.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Step Two – Install PXELinux

PXELinux is part of the SysLinux package

  • ZIP\core\pxelinux.0
  • ZIP\com32\menu\vesamenu.c32
  • ZIP\com32\modules\chain.c32
  • Copy the files into \\WDS\REMINST\Boot\x86
  • Rename pxelinux.0 to pxelinux.com
  • You also need to make copies of two original WDS files in this folder
  • Copy n12and rename it to pxeboot.0
  • Copy com and rename it to abortpxe.0
  • Create to new subfolders
  • \\WDS\REMINST\Boot\x86\Linux
  • \\WDS\REMINST\Boot\x86\pxelinux.cfg
  • The pxelinux.cfgfolder is where you store the files that make up the PXE boot (F12) menu.
  • All the files we will put in there are text files, even though they don’t use a .txtextension
  • First create a new text file called default.  This is the first menu that loads.
  • Paste the following text into it
  • DEFAULT c32
  • PROMPT 0
  • MENU TITLE PXE Boot Menu (x86)
  • MENU INCLUDE pxelinux.cfg/graphics.conf
  • MENU AUTOBOOT Starting Local System in 8 seconds
  • # Option 1 – Exit PXE Linux & boot normally
  • LABEL bootlocal
  • menu label ^Boot Normally
  • menu default
  • localboot 0
  • timeout 80
  • TOTALTIMEOUT 9000
  • # Option 2 – Run WDS
  • LABEL wds
  •  MENU LABEL ^Windows Deployment Services
  •  KERNEL pxeboot.0
  • # Option 3 – Exit PXE Linux
  • LABEL Abort
  • MENU LABEL E^xit
  • KERNEL abortpxe.0
  • Now create a text file called graphics.conf
  • This file controls how the menu is displayed. It’s very versatile so have a play around until it looks as basic or as flashy as you like
  • Paste the following text into it
  • MENU MARGIN 10
  • MENU ROWS 16
  • MENU TABMSGROW 21
  • MENU TIMEOUTROW 26
  • MENU COLOR BORDER 30;44 #00000000 #00000000 none
  • MENU COLOR SCROLLBAR 30;44 #00000000 #00000000 none
  • MENU COLOR TITLE 0 #00269B #00000000 none
  • MENU COLOR SEL 30;47          #40000000 #20ffffff
  • MENU BACKGROUND background.jpg
  • NOESCAPE 0
  • ALLOWOPTIONS 0
  • If you want to use a custom background, place it in the \\WDS\REMINST\Boot\x86folder.
  • The image should be a 640×480 jpeg file.
  • Make sure it has the same name as specified in the MENU BACKGROUND line in conf
  • Now we need to change the default boot program in WDS
  • Open the Windows Deployment Services Console
  • Right Click on your Server and select Properties
  • From the Boottab change the default boot program for x86 architecture to\Boot\x86\pxelinux.com
  • In Server 2008 R2 you have to use the wdsutil  command lineto set the the default boot program with these commands

wdsutil /set-server /bootprogram:boot\x86\pxelinux.com /architecture:x86

wdsutil /set-server /N12bootprogram:boot\x86\pxelinux.com /architecture:x86

Step Three – Test it out

Before you go any further, do a test PXE boot to check everything is OK.

I use a Hyper-V VM to make this testing process quicker. Just make sure it’s set to boot to a legacy network adapter in the settings

If it doesn’t load make sure you have the following files and folders in the right place within the\\WDS\REMINST share

  • \Boot\x86\pxelinux.com
  • \Boot\x86\vesamenu.c32
  • \Boot\x86\chain.c32
  • \Boot\x86\pxeboot.0
  • \Boot\x86\abortpxe.0
  • \Boot\x86\background.jpg
  • \Boot\x86\Linux\
  • \Boot\x86\pxelinux.cfg\
  • \Boot\x86\pxelinux.cfg\default
  • \Boot\x86\pxelinux.cfg\graphics.conf

Step Four– Add new boot options

If you can boot into the new menu and still load WDS then we are ready to add our Linux distros and other tools. If not, go back to step one and check everything.

This stage is relatively easy. It is just a case of putting the relevant netboot files for your preferred distribution in to the \Boot\x86\Linux folder and then adding a menu option for them. You can find more info on where to get these from on the official WDSLinux wiki. I’ll show you a more generic way of doing things using Debian as an example

  • Create a new subfolder
  • \Boot\x86\Linux\Debian\
  • Download the netboot files (initrd.gz and linux) from a Debian mirror
  • Copy them into the Debian subfolder
  • Create a menu entry for them in \Boot\x86\pxelinux.cfg\default
  • LABEL debian6Netinstall
  • menu label ^Debian 6-0 Net-install
  • # Load the correct kernel
  • kernel /Linux/Debian/Linux
  • # Boot options
  • append priority=low vga=normal initrd=/Linux/Debian/initrd.gz

That’s all there is to it. As long as you download the correct files and boot the correct boot options on the append line of the menu, you should be OK.

What if I need 64-bit options

This is easy too just replicate everything we did in \Boot\x86 into \Boot\x64. Don’t forget to change the WDS Server boot program for the x64 architecture (as shown in step 2) to \Boot\x64\pxelinux.com

Taking it further

Hopefully you are reading this because you have numerous ideas of what you could boot to. To help you along I’ve included my current default menu as well as adding sub-menus for Linux and Tools. Most of them were fairly straightforward as they had special PXE version with instructions on their website, e.g. GParted & Clonezilla

default

DEFAULT      vesamenu.c32

PROMPT       0

 

MENU TITLE PXE Boot Menu (x86)

MENU INCLUDE pxelinux.cfg/graphics.conf

MENU AUTOBOOT Starting Local System in 8 seconds

 

# Option 1 – Exit PXE Linux & boot normally

LABEL bootlocal

menu label ^Boot Normally

menu default

localboot 0

timeout 80

TOTALTIMEOUT 9000

# Option 2 – Run WDS

LABEL wds

MENU LABEL ^Windows Deployment Services

KERNEL pxeboot.0

# Go to Linux sub-menu

LABEL linux

MENU LABEL ^Linux Distros

KERNEL vesamenu.c32

APPEND pxelinux.cfg/graphics.conf pxelinux.cfg/linux.menu

# Go to Tools sub-menu

LABEL tools

MENU LABEL ^Tools

KERNEL vesamenu.c32

APPEND pxelinux.cfg/graphics.conf pxelinux.cfg/tools.menu

# Exit PXE Linux

LABEL Abort

MENU LABEL E^xit

KERNEL abortpxe.0

 

linux.menu (save in same place default)

MENU TITLE Install a Linux Distro

 

LABEL debian6.0-amd64-Netinstall

menu label ^Debian 6-0 amd64-Net-install:

kernel /Linux/Debian-Net-Install-amd64/Linux

append priority=low vga=normal initrd=/Linux/Debian-Net-Install-amd64/initrd.gz

 

LABEL Centos5.0-Install

menu label ^Centos 5-0 32bit install:

kernel /Linux/Centos-5.0-32-bit/vmlinuz

APPEND ks initrd=Linux/Centos-5.0-32-bit/initrd.img ramdisk_size=100000

 

LABEL Debian-5.08-Installer

menu label ^Install 5.08 (Lenny)

kernel /Linux/debian-installer/i386/linux

append vga=normal debian-installer/allow_unauthenticated=true  initrd=/Linux/debian-installer/i386/initrd.gz

 

LABEL Main Menu

MENU LABEL ^Back to Main Menu

KERNEL vesamenu.c32

APPEND pxelinux.cfg/default

tools.menu (save in same place default)

MENU TITLE Tools

 

LABEL memtest

menu label ^Memory Test: Memtest86+ v4.20

kernel \Linux\memtest\memtestp

LABEL Clonezilla Live

MENU LABEL ^Clonezilla Live

kernel \Linux\Clonezilla\vmlinuz

append initrd=\Linux\Clonezilla\initrd.img boot=live live-config noswap nolocales edd=on nomodeset ocs_live_run=”ocs-live-general” ocs_live_extra_param=”” ocs_live_keymap=”” ocs_live_batch=”no” ocs_lang=”” vga=788 nosplash fetch=http://192.0.0.24:81/RemoteInstall/Boot/x86/Linux/Clonezilla/filesystem.squashfs

LABEL gparted

MENU LABEL ^GParted Live

kernel \Linux\gparted\vmlinuz

append initrd=\Linux\gparted\initrd.img boot=live config  noswap noprompt  nosplash  fetch=http://192.0.0.24:81/RemoteInstall/Boot/x86/Linux/GParted/filesystem.squashfs

TEXT HELP

GParted live version: 0.8.1-3. Live version maintainer: Steven Shiau

Disclaimer: GParted live comes with ABSOLUTELY NO WARRANTY

ENDTEXT

LABEL Main Menu

MENU LABEL ^Back to Main Menu

KERNEL vesamenu.c32

APPEND pxelinux.cfg/default