Recreate ActiveSync Virtual Directory in Exchange 2013, 2016 and 2019
Recreate ActiveSync Virtual Directory in Exchange 2013, 2016 and 2019 (Default Web Site) and (Exchange Back End)
This article describes how to recreate the Activesync virtual directory on Exchange Server 2013, Exchange Server 2016 and Exchange Server 2019. Recreating these 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 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 servers where IIS sites are located.
Our tasks below are based on Exchange 2016, and we will be using the Exchange Management Shell.
To recreate the ActiveSync Virtual Directory in Exchange 2013, 2016, and 2019, follow these steps:
Open the Exchange Management Shell (EMS) as an administrator.
Run the following command to remove the existing ActiveSync Virtual Directory:
Remove-ActiveSyncVirtualDirectory -Identity "ServerName\Microsoft-Server-ActiveSync"
Replace "ServerName" with the name of your Exchange server.
Run the following command to create a new ActiveSync Virtual Directory:
New-ActiveSyncVirtualDirectory -WebsiteName "Default Web Site" -ExternalUrl "https://mail.mitslab.com/Microsoft-Server-ActiveSync"
Replace "mail.mistlab.com" with your Exchange server's external hostname.
If you want to configure additional settings for the ActiveSync Virtual Directory, run the following command:
Set-ActiveSyncVirtualDirectory -Identity "ServerName\Microsoft-Server-ActiveSync" -<SettingName> <SettingValue>
Replace "<SettingName>" with the name of the setting you want to configure (e.g., "ExternalAuthenticationMethods") and "<SettingValue>" with the value you want to set for that setting.
Verify that the ActiveSync Virtual Directory has been recreated successfully by running the following command:
This should display the properties of the new ActiveSync Virtual Directory.
That's it! You have now recreated the ActiveSync Virtual Directory in Exchange 2013, 2016, and 2019.