Part 8 – Install and Configure Exchange Server 2019


In part 7 of this blog post series, we have successfully configured mail flow to internet to allow Exchange Server 2019 to send emails to internet domains. In this blog post, we will go through the configuration of Exchange Virtual Directories. Many of the client protocols used with Exchange Server are accessed through virtual directories. A virtual directory is used by Internet Information Services (IIS) to allow access to a web application such as Exchange ActiveSync, Outlook on the Web, or the Autodiscover service. You can manage a variety of virtual directory settings on Exchange 2019 including authentication, security, and reporting settings.

Configure Exchange Server 2019 Virtual Directories

Just like other versions of Exchange Server, Microsoft Exchange 2019 has following virtual directories. You can configure virtual directories by using Exchange Admin Center (EAC) or by using Exchange Management Shell (EMS).

  • OWA
  • ECP
  • Outlook Anywhere
  • ActiveSync
  • Exchange Web Services
  • OAB
  • Autodiscover
  • Mapi

Before configuring your virtual directories, you need to plan your namespace configurations. You can go through Exchange 2019 preferred architecture for more details.

OWA Virtual Directory Configuration

Although the name has changed to Outlook on the web for OWA, the name of the virtual directory is still “owa”. To configure Outlook on the web virtual directory, run the following Exchange Management Shell commands.

$namespace = “”

Set-OwaVirtualDirectory -Identity “HOSTNAME\OWA (Default Web Site)” -ExternalUrl https://$Namespace/owa -InternalUrl https://$Namespace/owa

To verify the OWA URL, run the following command.

Get-OwaVirtualDirectory | Select Server,ExternalURL,InternalURL | fl

Configure ECP Virtual Directory

To configure ECP virtual directory, run the following Exchange Management Shell commands.

Set-EcpVirtualDirectory -Identity “HOSTNAME\ECP (Default Web Site)” -ExternalUrl https://$namespace/ecp -InternalUrl https://$namespace/ecp

To verify the configuration of ECP virtual directory, run the following cmdlet.

Get-EcpVirtualDirectory | Select Server,ExternalURL,InternalURL | fl

Configure Outlook Anywhere

To configure Outlook Anywhere, run the following command.

Set-OutlookAnywhere -Identity “HOSTNAME\RPC (Default Web Site)” -ExternalHostname $namespace -InternalHostname $namespace -ExternalClientsRequireSsl $true -InternalClientsRequireSsl $true -DefaultAuthenticationMethod NTLM

To verify Outlook anywhere configuration, run the following command.

Get-OutlookAnywhere | Select Server,ExternalHostname,Internalhostname | fl

Configure ActiveSync Virtual Directory

Run the following command to configure activesync virtual directory.

Set-ActiveSyncVirtualDirectory -Identity “HOSTNAME\Microsoft-Server-ActiveSync (Default Web Site)” -ExternalUrl https://$namespace/Microsoft-Server-ActiveSync -InternalUrl https://$namespace/Microsoft-Server-ActiveSync

To verify the active sync configuration, run the following command.

Get-ActiveSyncVirtualDirectory | select server,externalurl,internalurl | fl

Configure Exchange Web Services Virtual Directory

Run the following command for exchange web services virtual directory configuration.

Set-WebServicesVirtualDirectory -Identity “HOSTNAME\EWS (Default Web Site)” -ExternalUrl https://$namespace/EWS/Exchange.asmx -InternalUrl https://$namespace/EWS/Exchange.asmx

To verify the configuration, run the following cmdlet.

Get-WebServicesVirtualDirectory | Select Server,ExternalURL,InternalURL | fl

Configure OAB Virtual Directory

Run the following command to configure OAB virtual directory.

Set-OabVirtualDirectory -Identity “HOSTNAME\OAB (Default Web Site)” -ExternalUrl https://$namespace/OAB -InternalUrl https://$namespace/OAB

To verify the OAB virtual directory URL configuration, run the following command.

Get-OabVirtualDirectory | Select Server,ExternalURL,InternalURL | fl

Configure AutoDiscover Virtual Directory

Configure AutoDiscover Service Internal URI. By default, it’s setup with server hostname.

Set-ClientAccessService -Identity <HOSTNAME> –AutoDiscoverServiceInternalUri “

To verify, run the following cmdlet.

Get-ClientAccessService | fl identity,autodiscoverserviceinternaluri

Configure MAPI Virtual Directory

Run the following command to configure MAPI virtual directory.

Set-MapiVirtualDirectory -Identity “HOSTNAME\mapi (Default Web Site)” -ExternalUrl https://$namespace/mapi -InternalUrl https://$namespace/mapi

To verify, run the following command.

Get-MapiVirtualDirectory | Select Server,ExternalURL,InternalURL | fl

Once all Exchange virtual directories are configured, restart IIS service by running the following command.

C:\> IISReset

Default Email Address Policy

After you have virtual directories configured, you can now go ahead with next step of configuring default email address policy for your messaging organization. If you have multiple SMTP domains added as an accepted domain and you want that domain to be added to every recipient in the organization, you need to update the default email address policy.

Microsoft recommend that you configure a user principal name (UPN) that matches the primary email address of each user. If you don’t provide a UPN that matches the email address of a user, the user will be required to manually provide their domain\user name or UPN in addition to their email address. If their UPN matches their email address, Outlook on the web (formerly known as Outlook on the web), ActiveSync, and Outlook will automatically match their email address to their UPN.

Configure Default Email Address Policy
  • In the EAC, go to Mail flow > Email address policies.
  • Select the email address policy that you want to modify and click on Edit

  • In email address policy details, modify the settings as per your email address policy.

  • Make sure the policy is applied to “All Recipient Type” and Click on Save

  • Select the email address policy that you want to apply (a policy that has the Status value Unapplied). In the details pane, click Apply.

  • After you click Apply, a warning message that appears. Click Yes to apply the policy by using the EAC. A progress bar allows you to monitor the recipient update process. When updates are complete, click Close.


In this blog post, we have configured Exchange Server 2019 virtual directories with our defined namespace. We have also configured default email address policy and applied to all the recipient to ensure we have consistent address assignment policy in place as per the organizational standards. In next blog post, we will continue our post installation tasks of Exchange Server 2019.

Also published on Medium.