Installing Exchange Server 2019 on Windows Server 2019 Core – Notes From The Field


To prepare for supporting on-premises Exchange Server 2019, I felt it necessary to build out a basic lab. I've used a default installation lab to great effect during my career supporting Exchange, both for demonstration purposes and troubleshooting customer environments by comparing my default configuration to their custom settings. This is something I've looked forward to with each new version of the product.

A welcome feature of Exchange Server 2019 is the addition of Windows Server 2019 Core to the list of supported operating systems. I have precious little experience with Windows Server Core since it was introduced, so I first navigated to Bhalchandra Atre's excellent blog post Deploy Exchange Server 2019 on Windows Server Core and read it verbatim. My reason for this post is to expand on a few items that I encountered during my installation process that I found little documentation for, especially in the context of installing Exchange on Windows Server Core.

After spinning up a domain controller, a Windows 10 client and two Windows Server 2019 Server Core installs, I ran smoothly through the steps detailed in Bhalchandra’s post, downloading the latest files for installation noted in his post:

The UCMA 4.0 Runtime is still a prerequisite for installing Exchange 2019, but there’s no need to download it. As Bhalchandra points out, the UCMA installable is located under the “UCMARedist” folder on the Exchange Server 2019 .ISO.

I created the VMs with four volumes - one each for the OS, Exchange installation, databases and logs. Before going to install, I needed to initialize and format the Exchange installation and DB/Log volumes, a task easily done in PowerShell on Windows Server Core. Run Get-Disk to enumerate your disk numbers, then build your command lines. I’m sure there's a more efficient command line construction to accomplish this, but these three steps per disk ran smoothly for me:

Set-Disk -Number 1 -IsOffline $False
Get-Disk 1 | Initialize-Disk -PartitionStyle GPT
Get-Disk 1 | New-Partition -UseMaximumSize -DriveLetter F | Format-Volume -FileSystem NTFS -NewFileSystemLabel EXINSTALL
Set-Disk -Number 2 -IsOffline $False
Get-Disk 2 | Initialize-Disk -PartitionStyle GPT
Get-Disk 2 | New-Partition -UseMaximumSize -DriveLetter G | Format-Volume -FileSystem REFS -NewFileSystemLabel DB -SetIntegrityStreams $false
Set-Disk -Number 3 -IsOffline $False
Get-Disk 3 | Initialize-Disk -PartitionStyle GPT
Get-Disk 3 | New-Partition -UseMaximumSize -DriveLetter L | Format-Volume -FileSystem REFS -NewFileSystemLabel Logs -SetIntegrityStreams $false

You have the option to connect the Disk Management MMC from a regular Windows Server or Windows 10 client to Server Core systems to manage storage in a familiar fashion. As Server Core installs become more common in your environment, I recommend understanding your remote management options as detailed in Manage a Server Core server at Microsoft Docs.

Next, I had to learn how to configure the paging file on a Server Core installation. Microsoft Docs to the rescue again - Configure memory dump files for Server Core installation:

wmic computersystem set AutomaticManagedPagefile=False
wmic pagefileset where name="c:\\pagefile.sys" set InitialSize=32768,MaximumSize=32768

How did I come by that size? The minimum recommended RAM for the mailbox role is now 128 GB. The paging file guidance is defined as "a size equal to 25% of installed memory" according to the  Exchange Server system requirements, a notable change to the guidance of RAM + 10 MB to a maximum of 32778 that’s been recommended since April of 2014. Additionally, the paging file may now grow as large at 64 GB if you assign the maximum recommended RAM of 256 GB.

Next, I downloaded the latest HealthChecker.ps1 script and processed the output for any recommendations before putting the new Exchange installs into service. I regularly use and endorse this script with customers, and I highly recommend a monthly maintenance task of running the latest version of the script in your Exchange environment. Check out the available command line switches too, especially the -BuildHtmlServersReport to generate a very useful HTML output of the findings across multiple servers.

With the two servers prepped for installation, I pasted the unattended command line into the first server to begin the installation:

Setup.exe /m:install /roles:m /IAcceptExchangeServerLicenseTerms /InstallWindowsComponents

In my enthusiasm to get started, I pasted in this overly simplistic command line on the first server which neglected to leverage the options to name and locate the first database and its transaction logs. It's easy enough to move Exchange databases, even renaming the .edb file while it's making the trip, but I had another thought. At some point in the future, Exchange 2019 will need to be properly uninstalled and there's no Control Panel in Windows Server Core. That's where I picked up my third valuable experience worth mentioning here - how to uninstall Exchange from Windows Server Core. You currently have one option recommended by the product group to do this: the command line.

I proceeded with the installation of the second Exchange 2019 server with the correct command line, rebooted it, then moved the Administrator mailbox and the -Arbitration mailboxes from the first database to the second one to prepare for the uninstallation of the first server. I pasted in this command line to start the uninstallation process:

Setup.exe /m:uninstall /roles:m /IAcceptExchangeServerLicenseTerms

The process failed at the prerequisite check, complaining of mailboxes still present on the server. The error reminded me to move or remove user mailboxes, system mailboxes, archive mailboxes and audit log mailboxes. Not the first time I’ve forgotten that one... Once I moved the audit log mailbox, the uninstall processed smoothly.

Important: You may find generalized guidance detailing how to uninstall software on Windows Server Core using MSIEXEC. Attempting to uninstall Exchange using this method will result in an incomplete removal of the server and is therefore not recommended. The product group supports both the GUI and command line options to install Exchange Server 2019, and currently just the command line option for uninstallation.

Here are the unattended installation commands I used and recorded in my build document:

Setup.exe /m:install /roles:m /MdbName:DB1 /DbFilePath:"G:\DB1\db1.edb" /LogFolderPath:"L:\DB1" /IAcceptExchangeServerLicenseTerms /InstallWindowsComponents
Setup.exe /m:install /roles:m /MdbName:DB2 /DbFilePath:"G:\DB2\db2.edb" /LogFolderPath:"L:\DB2" /IAcceptExchangeServerLicenseTerms /InstallWindowsComponents

Note: I didn't run /PrepareAD first as a standalone command because I was logged in with the necessary credentials to extend the schema on a server in the same site and domain as the schema master.

After the installations completed, I ran through all the standard tasks of getting a new Exchange server ready to host mailboxes using the same methods as before with Exchange 2013/2016.

Windows Server Core management options were mentioned earlier, but I want to specifically call out the Windows Admin Center as an excellent way to manage all your recent vintage Windows Servers, and it’s especially useful for Server Core. If you have not tried it yet, you may be missing out on a utility that will significantly improve your daily Windows Server administration tasks.

Final thought - if you're building out a lab for testing and would like to populate it quickly with real world users and data, I highly recommend Aaron Guilmette's awesome script Create Realistic Lab Users. Run it with -TheWholeShebang parameter and watch it go!

Butch Waller
Senior Premier Field Engineer

Comments (0)

Skip to main content