ecp owa directories

How to Recreate OWA and ECP Virtual Directories on Exchange Server 2016


This article describes how to remove an existing IIS virtual directories OWA and ECP on the Microsoft Exchange Server 2016 and create a new one. 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)

Remove existing IIS virtual directories OWA and ECP and create a new one

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

IIS application pools OWA and ECP

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:

Get-OwaVirtualDirectory

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

READ ALSO  Add Calendar Permissions in Office 365 via Powershell

The same for ECP directory:

Get-ECPVirtualDirectory

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

IIS owa virtual directory

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”

new owa virtual directory

Now delete and re-create the 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”

remove ecp directory

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 IIS directories on Exchange 2016, for example OAB, EWS and Autodiscover.


You may also like:

Migrate email to Office 365 using WHM If you are like me, then you are simply wanting to migrate your email over to Microsoft Office 365 to take advantage of Exchange. Me and my colleague ...
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...
Grant Full Access to All Mailboxes in Exchange 200... This is a short tutorial on how to add full access to all mailboxes in Exchange 2007 and 2010 for a an additional user. This can come in handy when sa...
Exchange 550 5.7.1 RESOLVER.RST.AuthRequired; auth... If you are trying to send email from your web server to a distribution group email and it isn't going through, and the Exchange log shows the followin...
Windows Server 2012 Mailbox Role Process Execution... If you are trying to install Exchange 2010 on Windows Server 2012 and are receiving the error "Mailbox Role Process Failed.... Process execution faile...