This article describes how to recreate the Activesync virtual directory on Exchange Server 2013 and Exchange Server 2016.
Recreating of this virtual directories helps to reset all settings. It can
solve many problems relating to incorrect operation of smartphone ActiveSync
access: various mobile outlook errors,
permission problems, Outlook connectivity issues etc.
Note that the virtual directories are required to access
Exchange services from 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 2013, the Mailbox and
Client Access roles can
be installed on separate servers. Therefore, on the
Mailbox server, virtual directories are located on the
ExchangeBackEnd site (listening TCP ports 81, 444). In contrast, on the CAS server, the virtual
directories are found on the DefaultWebSite site
(listening TCP ports 80, 443).
In Exchange 2016, the Mailbox and
Client Access roles are consolidated (separated CAS role was eliminated).
Therefore, on the Mailbox server, virtual directories are located in on the same server in these two sites:
·
DefaultWebSite site (listening
TCP ports 80, 443)
·
ExchangeBackEnd site (listening
TCP ports 81, 444)
The example
above shows the Exchange 2016 Server with both the Default Web site and
Exchange Back End
Note: Run
these commands in the appropriate servers where the IIS sites are located.
Our tasks below
are based on Exchange 2016, and we will be using the Exchange Management Shell.
1.
First,
we need to determine the full name of the virtual directory on which the
problems observed. In our chase, it is the Activesync the Exchange organisation:
Get-ActivesyncVirtualDirectory
In our example, the name of the directory – Microsoft-Server-Activesync (Default Web Site)
2.
Display
and remember the virtual directory setting (ExternalURL, InternalURL,
authentication settings):
Get-ActivesyncVirtualDirectory “Exchangeservername\Microsoft-Server-ActiveSync
(Default Web Site)”|select-object InternalUrl, ExternalUrl,
BasicAuthentication, WindowsAuthentication, DigestAuthentication,
FormsAuthentication
3.
Delete
the Activesync directory.
Remove-ActiveSyncVirtualDirectory -Identity
“Microsoft-Server-ActiveSync (Default Web Site)”
Press Y and press Enter
to confirm.
4.
Create
a new Activesync directory
New-ActiveSyncVirtualDirectory -WebSiteName
"Default Web Site" -ExternalUrl
https://FQDN/Microsoft-Server-ActiveSync -InternalUrl
https://FQDN/Microsoft-Server-ActiveSync
5.
Remove
the Site in Back End
Remove-ActiveSyncVirtualDirectory -Identity
“Server Name\Microsoft-Server-ActiveSync (Exchange Back End)”
6. Recreate the Site in Back End
New-ActiveSyncVirtualDirectory -WebSiteName
"Exchange Back End"
That’s
it!