So you like to configure the autodiscover URL in Exchange Server with PowerShell. The best practice is to have it point to autodiscover.company.com. In one of the previous articles, we discussed how to Find autodiscover URL in Exchange with PowerShell. If you like to get the current server URLs, read the article Find Exchange Server URLs with PowerShell.
Note: The internal autodiscover can only be set with Exchange Management Shell. There is no option to configure internal autodiscover in Exchange Admin Center.
Table of contents
Check third-party certificate
Ensure that you have a third-party certificate installed in Exchange Server before you proceed further:
- How to create certificate in Exchange Server
- Install FREE Let’s Encrypt certificate in Exchange Server
Note: If no third-party certificate is configured in Exchange Server that covers the autodiscover URL, and you change the autodiscover URL, users will get a certificate warning in Outlook.
Get autodiscover URL
Let’s get the autodiscover URL on the Exchange Servers that we want to change. Run Exchange Management Shell as administrator and run the Get-ClientAccessServer cmdlet.
Now that we have the output, we can proceed further. We like to change the autodiscover URL on both the Exchange Servers EX01 and EX02.
Configure autodiscover URL
Configure autodiscover on both the Exchange Servers with Set-ClientAccessServer cmdlet. After that, restart IIS with the command iisreset.
The difference between iisreset and issreset /noforce command.
The /noforce parameter is recommended as a safeguard against data loss in case the IIS services cannot all be stopped within the one minute timeout period. If you are certain that it is safe to force IIS to restart, you can omit the /noforce parameter. In addition, if you are logged on locally, the computername parameter is not required. If you are administering an IIS server remotely, the computername parameter is the NetBIOS name of the computer on which you wish to restart IIS.
Verify autodiscover URL
Verify the result after the autodiscover change and that everything looks good.
Add CNAME record
There are different scenarios on how to add and point the autodiscover CNAME record:
- Round-robin DNS: Add two CNAME records in the internal DNS server for autodiscover.exoip.com. Pointing to both the Exchange Servers EX01-2016 and EX02-2016. Assuming that both the Exchange Servers are the Client Access Servers (CAS).
- Load Balancer: Create a VIP on the load balancer. Pointing to both the Exchange Servers EX01-2016 and EX02-2016. Assuming that both the Exchange Servers are the Client Access Servers (CAS). Add a CNAME record in the internal DNS server for autodiscover.exoip.com. Pointing to the load balancer.
Verify autodiscover in Outlook
To verify autodiscover service works with Outlook, follow these steps:
- Start Outlook
- Hold down the CTRL key and right-click on the Outlook icon in the system tray
- Select Test Email AutoConfiguration
- Fill in the email address
- Check the checkbox Use AutoDiscover
- Uncheck the checkboxes Use Guessmart and Secure Guessmart Authentication
- Click on Test
- Select the tab Log
- Verify the result Succeeded (0x00000000)
Everything looks great!
Read more: Configure Internal and External URL in Exchange »
Conclusion
You learned how to configure autodiscover URL in Exchange. It’s only possible to configure the internal autodiscover with Exchange Management Shell/PowerShell. First, check how the autodiscover URL is configured on the Exchange Server. The second step is to change the autodiscover and reset IIS after the change. Finally, remember to add a CNAME record.
Did you enjoy this article? You may also like Configure pagefile in Exchange Server. Don’t forget to follow us and share this article.