Changing the Autodiscover url in Microsoft Exchange 2010


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 🙂

Posted in Exchange, Servers
Tags: ,
11 comments on “Changing the Autodiscover url in Microsoft Exchange 2010
  1. Mmendivil says:

    Thanks… I resolved my problem with this!!!

  2. Dean says:

    Thanks a mil, this was very helpful!

  3. Black_bird2 says:

    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

  4. Bora says:

    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 :):):)

  5. Robert Harrison says:

    Nicely done. Very clear and concise. Thank you.

  6. Pushparaj Sebastian says:

    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)WebServicesVirtualDirectory
    6)what are the area need to check in Exchange server to ensure autodiscover working fine external and internal

  7. Julian says:

    Thanks man, good work!

  8. EG says:

    This worked for me as well. thank you

  9. Lars says:

    Thank you very much. This was very helpful. Now every Error-Message is gone.

Leave a Reply

Your email address will not be published. Required fields are marked *

*