ecp owa directories

How to Recreate Virtual Directories OWA and ECP on Exchange 2016

This article describes how to recreate virtual directories OWA and ECP on Exchange 2016. The rebuilding of these virtual directories helps to reset all settings, recreate them from the scratch and can solve many Exchange problems related to the incorrect operation of OWA or ECP: various page errors, blank screen issues, permission problems, missing files, Outlook connectivity issues etc.

Let us remind you, that the virtual directories required to access Exchange from a web-based applications (such as Outlook Web App (OWA), Exchange Active Sync, Autodiscover). You can manage them in 3 places: EAC, EMS, IIS Manager. In Exchange 2016 Mailbox and Client Access roles are consolidated (separate CAS role was eliminated). Therefore, on the Mailbox server virtual directories are located in 2 different sites:

  • on a DefaultWebSite site (listening TCP ports 80, 443)
  • on a ExchangeBackEnd site (listening TCP ports 81, 444)

Recreate virtual directories OWA and ECP

OWA and ECP virtual directories in the IIS Manager console look like this:

Exchange 2016 Recreate Virtual Directories

You need to determine full name of the virtual directory on which the problems observed. To do this, start the Exchange Management Shell console and display a list of all OWA folders in the Exchange organization:


In our example, the name of the directory – owa (Default Web Site):

The same for ECP directory:


We are interested in the directory ecp (Default Web Site) on the server named EX2016.


Display and remember the virtual directory setting (ExternalURL, InternalURL, authentication settings):

Get-OwaVirtualDirectory “ex2016\owa (Default Web Site)”|select-object InternalUrl, ExternalUrl, BasicAuthentication,WindowsAuthentication,DigestAuthentication, FormsAuthentication

Get-EcpVirtualDirectory “ex2016\ecp (Default Web Site)”|select-object InternalUrl, ExternalUrl, BasicAuthentication,WindowsAuthentication,DigestAuthentication, FormsAuthentication

IIS owa virtual directory internal

Delete the OWA directory on the server ex2016:

Remove-OwaVirtualDirectory “ex2016\owa (Default Web Site)”

Create a new OWA directory:

New-OwaVirtualDirectory  -InternalUrl “https://mail.contoso.local/owa” -ExternalUrl “https://mail.contoso.local/owa”


Now delete and recreate virtual directory ECP in similar way:

Remove-EcpVirtualDirectory -Identity “ex2016\ecp (Default Web Site)”

New-EcpVirtualDirectory  -InternalUrl “https://mail.contoso.local/ecp” -ExternalUrl  “https://mail.contoso.local/ecp”


In some cases it is also useful to recreate OWA and ECP on the Exchange Back End site:

remove-WebApplication -Site "Exchange Back End" -Name owa

remove-WebApplication -Site "Exchange Back End" -Name ecp

New-WebApplication -Site "Exchange Back End" -Name owa -PhysicalPath "C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\owa" -ApplicationPool MSExchangeOWAAppPool

New-WebApplication -Site "Exchange Back End" -Name ecp -PhysicalPath "C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp" -ApplicationPool MSExchangeECPAppPool

In the same way you can reset all other virtual directories on Exchange 2016, for example OAB, EWS and Autodiscover.

You may also like:

Add An Out Of Office Message In Outlook for A Diff... Did an employee just leave for vacation and forget to do something? Below the instructions will show you how to add an out of office message in Outloo...
Exchange 550 5.7.1 RESOLVER.RST.AuthRequired; auth... We have faced the following error when were trying to send an email outside organization to the (from the Gmail) to a distribution group (list) or a p...
Moving Exchange Mailboxes to Another Database Exchange administrator can move user mailboxes in the Active Directory forest from one database to another between Exchange servers, or between mailbo...
How to Add or Remove SMTP Alias to Exchange 2016 M... Sometimes you need to add another email address to the existing user. In Exchange, in addition to the primary address, each mailbox can be assigned to...
Managing Mailbox Size and Quota on Exchange Server... One of the important tasks of an Exchange administrator is controlling mailbox sizes. It is very difficult to force users to voluntarily limit the siz...
  1. Posted by LeakYou
  2. Posted by ednauseam

Add Your Comment