Installing Exchange 2019 on Windows Server 2019 Core.

Tzahi Kolber
10 min readAug 5, 2018

--

In this blog, I will review the Exchange 2019 installation on Windows 2019 Core edition.

Besides Exchange 2019 installation, I will add few tips and best practices to fine-tune OS configuration for Exchange usage, based on the Exchange product team recommendations.

Prerequisites:

Active Directory:

Active Directory running as a Global Catalog, on an at least Windows server 2012 R2 and above. Please note that it must be a writable domain controller and not an RODC (Read Only Domain Controller).

Installing Exchange 2019 into an existing Exchange’s environment:

In case you would like to install Exchange 2019 into an existing exchange environment, please keep in mind, that like all other earlier Exchange’s versions, all the existing Exchange servers, must be at least Exchange current version (2019) with N-2. That means that the minimum Exchange-s version installed in that environment will be Exchange 2013, with the latest updates, currently Exchange 2013 CU21.

Office clients:

Like Exchange’s versions, Office also should be at N-2 version. This means that the minimum supported version for Outlook to work with Exchange 2019 is Outlook 2013 SP1 with the latest updates.

Preparing Windows 2019 Core for Exchange 2019 installation:

General Administration:

Most of the OS configuration, can be done using Sconfig, which is the best and maybe the only “GUI” utility that allows you manage many local configurations regarding the OS like networking, domain membership, regional settings, windows update and many more.

In order to run Sconfig, just type sconfig at the CMD window and you will be able to see the nice “Dos” based GUI (remind me of the legendary Syscon menu by Novell).

Networking:

As I mentioned earlier, most of the OS configuration can be done using Sconfig, including networking. In case you would like to run a set of Powershell commands and make the OS configuration more quickly, you can use the networking commands like *-NetAdapter. Use the following steps to configure your adapter using Powershell:

Import-Module NetAdapter

- Get the network adapter name that you would like to configure, by running

Get-NetAdapter

- Set the netadapter (NIC1 in this example):

$Netadapter = Get-NetAdapter -Name NIC1

- In case you would like to rename the Network Adapter, run the following command:

Rename-netadapter –name “NIC1” Ethernet

- Disable DHCP (in case it configures to get an automatic IP address:

$netadapter | Set-NetIPInterface -DHCP Disabled

- Configure IP address and default gateway (class C in this example):

- Configure the DNS server IP addresses (in case you have changed the NIC’s name to Ethernet).

Firewall:

In case you are happy with security configuration at your environment and you must set all firewall profiles for 0 security (Not recommended), you can run the next powershell command, that set the 3rd profiles (Domain,Public and Private) to false:

Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled false

Disk Management:

Disk / Drive management can be done using 3 common ways:

- Poweshell commands: *disk / *volume commands

- CMD command: diskpart

- Remote Computer management: The most convenient way in my opinion.

Just open Computer management form other computer and select the computer name (your Exchange server 2019 server):

Now you can see and manage all the drives on your Windows 2019 core server.

Pagefile:

since Exchange 2013 CU4 (SP1), the Exchange product group recommended setting of 32GB + 10MB minimum and maximum.
But for Exchange 2019, the recommended pagefile size is 25% of the total RAM:
https://docs.microsoft.com/en-us/exchange/plan-and-deploy/system-requirements?view=exchserver-2019#hardware-requirements-for-exchange-2019

In order to show the current pagefile configuration, you can run the next command:

wmic.exe pagefile

- In order to change it, we need first to set the pagefile from automatic to manual:

wmic computersystem set Automaticmanagedpagefile=false

- Since the total memory of our server is 128GB RAM, we will set the minimum and maximum size to 32GB (25% of 128GB):

wmic pagefileset set initialsize=32778,Maximumsize=32778

- To view the new pagefile configuration, run the next command:

wmic pagefileset

Power configuration:

The best practice for power config is to allow the system to run on “High Performance” in order to get the maximum power for our servers (especially for CPU).

To view the current power configuration, run the next command from CMD (not PowerShell):

powercfg.exe /list

In case the server is not configured for High Performance, run the following command (from CMD):

powercfg.exe /s “8c5e7fda-e8bf-4a96–9a85-a6e23a8c635c”

Preparing for Exchange 2019 installation:

After we have configured Windows 2019 Core for better performance from the Exchange’s aspect, we can continue to the next steps, with the Exchange’s prerequisite installations.

Downloading Exchange 2019 :

After downloading Exchange Server 2019 ISO from VLSC (Volume License Service Center) or from MSDN, verify that marking the file as “UnBlock”

Mounting the ISO file:

To mount the ISO file, after you have copied it to the Exchange’s server that will host the Exchange, run the following command, with the path where the ISO is located:

Mount-DiskImage C:\Setup\E19\mu_exchange_server_2019_x64_dvd_5fa4d915.iso

To get the list of all drive letters and the location of the mounted ISO, you can run the following command:

Get-volume

Installing the Server Media Foundation feature:

Before installing the UCMA component, you must install the Server Media Foundation feature.
In case that you will not install it first, you will get the next error:

In order to install it, just run the following command from PowerShell:

Install-WindowsFeature Server-Media-Foundation

Running UCMA:

Part of the Exchange’s prerequisites, is the UCMA, which is located inside the Exchange 2019 that was mounted, inside the UCMARedist folder.

Make sure you run it from Powershell and not from cmd. If you will try to run the UCMA installation from the cmd window, you will get the following error:

Installing Visual C++ Redistributable Packages for Visual Studio 2013:

The second prerequisite along with the UMCA is the Visual C++ Redistributable package.

After you have downloaded the vcredist_x64.exe file to your Windows 2019 core server, you can just click it and complete the installation.

Installing IIS URL Rewrite Module:

The IIS URL Rewrite Module is required with Cumulative Update 11 or later.

After you have downloaded the rewrite_amd64_en-US.msi file to your Windows 2019 core server, run the next command from Windows PowerShell:
Start-Process msiexec.exe -Wait -ArgumentList ‘/I C:\Temp\rewrite_amd64_en-US.msi /quiet /norestart’

Windows prerequisites installation:

The easiest way to install the Windows prerequisites is by running the Exchange’s installation with the /InstallWindowsComponnents switch.

In case you would like to run the Windows prerequisites prior to the Exchange’s installation, run the following command:

Install-WindowsFeature Web-WebServer,Web-Common-Http,Web-Default-Doc,Web-Dir-Browsing,Web-Http-Errors,Web-Static-Content,Web-Http-Redirect,Web-Health,Web-Http-Logging,Web-Log-Libraries,Web-Request-Monitor,Web-Http-Tracing,Web-Performance,Web-Stat-Compression,Web-Dyn-Compression,Web-Security,Web-Filtering,Web-Basic-Auth,Web-Client-Auth,Web-Digest-Auth,Web-Windows-Auth,Web-App-Dev,Web-Net-Ext45,Web-Asp-Net45,Web-ISAPI-Ext,Web-ISAPI-Filter,Web-Mgmt-Tools,Web-Mgmt-Compat,Web-Metabase,Web-WMI,Web-Mgmt-Service,NET-Framework-45-ASPNET,NET-WCF-HTTP-Activation45,NET-WCF-MSMQ-Activation45,NET-WCF-Pipe-Activation45,NET-WCF-TCP-Activation45,Server-Media-Foundation,MSMQ-Services,MSMQ-Server,RSAT-Feature-Tools,RSAT-Clustering,RSAT-Clustering-PowerShell,RSAT-Clustering-CmdInterface,RPC-over-HTTP-Proxy,WAS-Process-Model,WAS-Config-APIs

Running Exchange 2019 installation:

Impotent: Before installing Exchange 2019 and like any Exchange’s installation since Exchange 2007, please consider installing it first on a deployment site, to minimize any certificates popups and wrong configuration by Autodiscover from the new server. You can review the blog posted at the Exchange’s product group web site.

One of the most common tasks running after any Exchange’s installation to move all the arbitration mailboxes from the default database and deleting it. In order to save time, you can configure ahead the first database name and location for the edb and transaction logs. To do that, you can use the following command with small changes regarding your new database name and locations :

Setup.exe /m:install /role:m /IacceptExchangeServerLicenseTerms /InstallWindowsComponents /MdbName:DB01 /DbFilePath:”C:\DB\DB01\DB01.edb” /LogFolderPath:”C:\DB\DB01"

Post Exchange 2019 installation:

After installing Exchange 2019, like Exchange 2013, you have 2 ways to manage Exchange:

- Using powershell: By running the LaunchEMS command:

- Using the EAC (Exchange Administration Center) / Web interface from any other computer, since you cannot run any browser on Windows 2019 core.

By the way, the Exchange 2019 major version is 15.2:

Setting Exchange’s virtual directories sites:
After you have installed Exchange 2019 server, like previous versions of Exchange, you should set the virtual directories of all Exchange’s services.
In our example, we will run the settings against a server called EXSRV01. Configure all other settings like authentication methods and URL names, according to your environment:

OWA Virtual Directories:

Set-OwaVirtualDirectory -Identity “EXSRV01\OWA (Default Web Site)” -ExternalUrl https://mail.msft.net/owa -InternalUrl https://mail.msft.local/owa

ECP Virtual Directories:

Set-ECPVirtualDirectory -Identity “EXSRV01\ECP (Default Web Site)” -ExternalUrl https://mail.msft.net/ecp -InternalUrl https://mail.msft.local/ecp

OAB Virtual Directories:

Set-OabVirtualDirectory -Identity “EXSRV01\OAB (Default Web Site)” -InternalUrl https://mail.msft.local/oab -ExternalUrl https://mail.msft.net/oab

ActiveSync Virtual Directories:

Set-ActiveSyncVirtualDirectory –Identity “EXSRV01\Microsoft-Server-ActiveSync (Default Web Site)” –ExternalUrl https://mail.msft.net/Microsoft-Server-ActiveSync –InternalUrl https://mail.msft.local/Microsoft-Server-ActiveSync

Exchange Web Services Virtual Directories:

Set-WebServicesVirtualDirectory –Identity “EXSRV01\EWS (Default Web Site)” -InternalUrl https://mail.msft.local/ews/exchange.asmx –ExternalUrl https://mail.msft.net/EWS/Exchange.asmx

MAPI Virtual Directories:

Get-mapiVirtualDirectory -Server EXSRV01 | Set-mapiVirtualDirectory -InternalUrl https://mail.msft.local/mapi -ExternalUrl https://mail.msft.net/mapi

Autodiscover Virtual Directories:

Set-ClientAccessServer -Identity EXSRV01 -AutoDiscoverServiceInternalUri https://autodiscover.msft.local/autodiscover/autodiscover.xml

Outlook Anywhere Virtual Directories:

Set-OutlookAnywhere -Identity “EXSRV01\Rpc (Default Web Site)” -IISAuthenticationMethods NTLM, Basic -SSLOffloading $False -ExternalClientAuthenticationMethod Basic -InternalClientAuthenticationMethod NTLM -ExternalClientsRequireSsl $True -InternalClientsRequireSsl $True -InternalHostname mail.msft.local -ExternalHostname mail.msft.local

Setting up Exchange’s certificate:
In case you are installing Exchange 2019 into an existing exchange’s environment, you can just export the certificate from one of the existing servers and import the pfx (Certificate’s private key) to the new Exchange2019 server.
In case you are installing a new Exchange server in a greenfield environment, create a new certificate request against your CA server.

Setting Kerberos authentication (In case it was configured previously):
In case your Exchange’s environment is configured with Kerberos authentication, you must set the list of steps in order to allow users authenticate this server with Kerberos as well.
More information about Exchange 2019 and Kerberos authentication settings, can be found in the next link:
https://medium.com/@tkolber/https-medium-com-tkolber-configure-kerberos-authentication-with-exchange-2019-72293aa234c

Antivirus Exclusions:
After Exchange 2019 is running, don’t forget to exclude all the folders and extensions according to Microsoft’s best practices.

Antimalware — are you going to use it?
In case you are intending to run a 3rd party antivirus system that will scan your messaging transport on the Exchange 2019 servers, don’t forget to disable the Malware agent. To verify the state of the Malware agent, run the following command:

Get-TransportAgent

In case you would like to disable it, use the script located at the scripts folder under the exchange’s installation folder.

.\Disable-AntimalwareScanning.ps1

After you run the script, restart the transport service:

Restart-Service MsExchangeTransport

Now verify its UP by running the following command and check that the status of the service is Running:

Get-Service MsExchangeTransport

Conclusions:

During this blog, we reviewed the Windows 2019 core configuration in order to prepare it in the best way for Exchange 2019 installation.

In addition, we walk through the small but crucial installations so we will be able to get a clean and smooth Exchange’s installation.

At last, we reviewed important fine-tuning configurations of Exchange needs to be done, to get the maximum performance with minimum impact on user’s daily work in an existing environment.

Good Luck 😊

--

--

Tzahi Kolber

During the last 15 years, I was working as a Senior PFE within Exchange area at Microsoft. Now I’m Senior Consult as Azure IAAS, PowerShell & Automations.