3aIT Blog

 


So we hit an issue trying to change the autodiscover url in Exchange 2010 to enable our iPhone and Mac Mail users to have a nice easy setup since the client had changed their domain. After faffing about using the GUI and looking through IIS settings it was time to break out the command line.

Firstly I wanted to see what was set, in Exchange PowerShell type the following

Get-WebServicesVirtualDirectory |fl identity,internalurl,externalurl

This gives you the below output

Identity    : ESERVER01\EWS (Default Web Site)
InternalUrl : https://mail.olddomain.com/EWS/Exchange.asmx
ExternalUrl : https://mail.olddomain.com/ews/exchange.asmx

SO I needed to change both the URLS,

This was done buy running these commands,:

Set-WebServicesVirtualDirectory -Identity “ESERVER01\EWS (Default Web Site)” -InternalUrl https://mail.newdomain.com/EWS/Exchange.asmx -BasicAuthentication:$true

Set-WebServicesVirtualDirectory -Identity “ESERVER01\EWS (Default Web Site)” -ExternalUrl https://mail.newdomain.com/EWS/Exchange.asmx -BasicAuthentication:$true

Lastly we need to change the url for the Autodiscover.xml

Get-ClientAccessServer |fl identity,autodiscoverserviceinternaluri

The result is :-

Identity : ESERVER01
AutoDiscoverServiceInternalUri : https://mail.olddomain.com/Autodiscover/Autodiscover.xml

So we run :

Set-ClientAccessServer -Identity ESERVER01 –AutoDiscoverServiceInternalUri https://mail.newdomain.com/Autodiscover/Autodiscover.xml 

Then everything picked up the new settings and worked :)

Comments  
# Maz 2014-04-16 15:00
Thanks
# Johnny 2016-05-10 19:40
Thanks! This procedure saved my life!
# Mmendivil 2014-05-08 00:12
Thanks... I resolved my problem with this!!!
# Dean 2014-08-26 19:55
Thanks a mil, this was very helpful!
# Black_bird2 2014-11-23 00:10
Legendary effort! Fixed an annoyance of mine for over a week. Once this was done all I had to do was repair my outlook account and presto, no more autodiscover error!! Thank you so much
# Bora 2015-02-17 19:25
Hello I was having trouble for one week about connection errors with owa outlook iphone android devices. I took a lot of help from seperate people but no body can helped me. After finding this blog and applying what you showed here my all problems has resolved. Now it is time to thank you about this very very helpful link. Thanks very very much you saved my life :):):)
# Robert Harrison 2015-07-04 00:33
Nicely done. Very clear and concise. Thank you.
# Pushparaj Sebastian 2015-08-11 12:02
how to set -AutoDiscoverServiceExternalUri in exchange 2013 can you please provide details about ,what is the different between below 1) AutoDiscoverServiceExternalUri 2) -AutoDiscoverServiceInternalUri 3)-ExternalUrl 4 )-InternalUrl 5)AutodiscoverVituralDirectory 5)W ebServicesVirtualDirectory 6)what are the area need to check in Exchange server to ensure autodiscover working fine external and internal
# Julian 2015-09-30 10:47
Thanks man, good work!
# EG 2016-01-20 05:55
This worked for me as well. thank you
# Lars 2016-01-21 13:10
Thank you very much. This was very helpful. Now every Error-Message is gone.
# Dave Turner 2017-06-12 01:41
Been banging my head for days on this one on a SBS2011 with Exchange 2010. Just realized these steps show URI instead of URL as other sites show. Fixed my problem! Thanks! Set-ClientAccessServer -Identity ESERVER01 –AutoDiscoverServiceInternalUri https://mail.newdomain.com/Autodiscover/Autodiscover.xml

New comments disabled.

Subscribe to our newsletter

Sign up to receive a monthly roundup of our best blogs and latest news.
Fields marked with * are required

Archives