In some cases, you may receive an error when you try to configure a connection to Exchange Server in Outlook Client for a new user, or when you try to connect to an Exchange mailbox server with a configured Outlook: the connection to Microsoft Exchange is unavailable. This article will show you how to troubleshoot and fix this error.
The connection to Microsoft Exchange is unavailable. Outlook must be online or connected to complete this action.
First, check that the Autodiscover service is working correctly on the Exchange server.
You can use the following PowerShell cmdlet to test AutoDiscover:
Test-OutlookWebServices –identity emusk@poweradm.com –MailboxCredential (Get-Credential)
If you have not installed the Exchange Management Shell module, hold down CTRL
and right-click the Outlook icon in the Windows tray. Click Test E-mail AutoConfiguration.
In the window that opens, enter the user’s email address, select Use Autodiscover, and click Test. If the Exchange Autodiscover service is available and configured correctly, the last line will display Succeeded.
When you connect to your published Exchange server over the Internet, you must use the Microsoft Remote Connectivity Analyzer service to check the DNS records, Autodiscover, and Exchange availability remotely (https://testconnectivity.microsoft.com/tests/Ola/input)
Select Exchange Server -> Outlook Connectivity, enter your mailbox email address on the Exchange Server, UPN, and password, solve the captcha, and click Test.
This test checks all stages of the connection from Outlook to a mailbox on the on-premises Exchange Server (including the RPC over HTTP and MAPI over HTTP protocols).
Suppose the client computer and the Exchange server + domain controller with the Global Catalog role are located in different AD sites. In that case, you need to create a custom registry parameter on the client machine.
- Open the registry editor (
regedit.exe
); - Navigate to the registry key
HKEY_CURRENT_USER\Software\Microsoft\Exchange\Exchange Provider
(create this key manually if it is missing); - Add a new REG_SZ parameter with the DS Server;
- Specify your domain controller’s FQDN with the Global Catalog role as a parameter value;
- Reboot your computer and create a new mail profile in Outlook.
If all users are complaining about a connection problem to Exchange from Outlook at the same time, Run the following commands in the Exchange Management Shell console on your Microsoft Exchange server with the CAS (Client Access Server) role:
Test-OutlookWebServices -ClientAccessServer exch1.poweradm.com|ft
Make sure all services return Success. Check that all URLs on the Exchange server are configured correctly for the OAB and Autodiscover mechanisms. Fix errors and run the command:
Test-WebServicesConnectivity -ClientAccessServer exch1.poweradm.com
If any of the services are not working, check the status of the corresponding services on the Exchange server. Also, check that the Microsoft Exchange Attendant service is running.
Sometimes you may need to re-create the IIS virtual directories to fix the connectivity issue.
There are a couple of other ways to fix the problem on the Outlook side:
- You can re-create your Outlook mail profile in the Control Panel
(Mail 32bit
applet); - If RPC encryption is disabled on CAS servers (
Set-RpcClientAccess –Server exch1.poweradm.com –EncryptionRequired:$False
), turn it off in the settings of your Outlook profile (Encrypt data between Microsoft Office Outlook and Microsoft Exchange); - You can check for an RPC connection in older versions of the Exchange Server by using the command:
outlook /rpcdiag
- Check that you can access your mailbox from a browser using OWA (Outlook Web Access);