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:

Get-OwaVirtualDirectory

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

READ ALSO  Distribution List Not Receiving Out-Of-Office Replies

The same for ECP directory:

Get-ECPVirtualDirectory

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

Get-ECPVirtualDirectory

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-OwaVirtualDirectory

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”

New-EcpVirtualDirectory

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:

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...
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...
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...