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

SO I needed to change both the URLS,

This was done buy running these commands,:

Set-WebServicesVirtualDirectory -Identity “ESERVER01\EWS (Default Web Site)” -InternalUrl -BasicAuthentication:$true

Set-WebServicesVirtualDirectory -Identity “ESERVER01\EWS (Default Web Site)” -ExternalUrl -BasicAuthentication:$true

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

Get-ClientAccessServer |fl identity,autodiscoverserviceinternaluri

The result is :-

Identity : ESERVER01
AutoDiscoverServiceInternalUri :

So we run :

Set-ClientAccessServer -Identity ESERVER01 –AutoDiscoverServiceInternalUri 

Then everything picked up the new settings and worked 🙂

Posted in Exchange, Servers
Tags: ,
12 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:

    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
    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.

  10. 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

Leave a Reply

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