[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More


7 Steps to AutoDiscover Heaven

Published on
29,375 Points
24 Endorsements
Last Modified:
Community Pick
Since I couldn't find anything on the internet that describes how to do a complete Autodiscover reset, I thought I'd write one...

I have spent quite a bit of time testing this in an Exchange 2007 SP3 lab and have fixed an Autodiscover problem on an Exchange 2010 SP1 production environment with the following steps, so it should also work for you.  Please try and be on the latest Service Packs for Windows and Exchange as this will solve lots of issues for you and is better for supportability.

This is my first article, so bear with me. If you find this article useful then please vote for it.

Autodiscover complete reset:


Open EMS and do "Get-AutoDiscoverVirtualDirectory | Remove-AutodiscoverVirtualDirectory"


Open windows Explorer and rename the ":\Program Files\Microsoft\Exchange Server\ClientAccess\autodiscover" folder on your CAS server/s


Copy 'Autodiscover' folder from <Exchange install or SP source files, whatever version you have installed>\setup\serverroles\clientaccess\autodiscover to the ClientAccess folder mentioned in Step 2


Edit the web.config file in the ":\Program Files\Microsoft\Exchange Server\ClientAccess\autodiscover" folder on your CAS servers and replace "%ExchangeInstallDir%" with "<drive>:\Program Files\Microsoft\Exchange Server\" or whereever you have your "Exchange Server" Folder is. If you are running Exchange 2010 then replace it with "<drive>:\Program Files\Microsoft\Exchange Server\V14\". Be sure to replace <drive> with the drive letter where Exchange is installed.


On the CAS server/s open Windows Explorer and right-click on the ":\Program Files\Microsoft\Exchange Server\ClientAccess\autodiscover" folder and the go into it's Properties-->Security-->Permissions and Add 'Authenticated Users' to the Autodiscover folder NTFS Permissions with 'Read', 'Read & Execute' and 'List folder contents' permissions. Press OK.


Open EMS and do "New-AutoDiscoverVirtualDirectory" (you shouldn't have to specify any additional parameters to create it on a single CAS)


Open and Command Prompt and do "IISReset" (I am not sure you have to do this, but I always like to after so many changes)
Now going to your server on https://<Internal_CAS_Name_on_Certificate>/autodiscover/autodiscover.xml should result in a credentials prompt, after typing in valid credentials you should get a "ErrorCode=600 Invalid Request page". Which is what you want and means things are working as they should do. "Test-OutlookWebServices |fl" in EMS should now work too.

Other Useful info:
If "get-ClientAccessServer |fl" show the AutoDiscoverServiceInternalUri is blank(Null) then Test-OutlookWebServices will give you a "Index was out of range" error. So basically this means your SCP (Service Connection Point) is blank and doesn't know where to forward your Autodiscover Service request to. So be sure to set a valid internal URL with "get-ClientAccessServer | Set-ClientAccessServer -AutoDiscoverServiceInternalUri "https://<Internal_CAS_Name_on_Certificate>/autodiscover/autodiscover.xml"
If the AutoDiscoverSiteScope value is empty(Null) or assigned to an invalid site then this appears not to cause any issues (in a test environment).
If you are really struggling with your SCP you can delete it and the setting the value of AutoDiscoverServiceInternalUri like in the above bullet point will recreate it for you OR use Split DNS and an internal SRV record
HTTP logs are under C:\Inetpub\logs\logfiles\w3svc1 on Windows 2008, but you shouldn't need them after the reset
If you want detailed Error display in IE when testing from the CAS server = add reg key HKLM\SOFTWARE\Microsoft\Fusion\EnableLog (DWORD) =1 to the registry on the CAS server

By now you should be rid of your Error 500, Error 404 etc. If not, drop a post on this article and I will try and help you.

If you have any questions or queries or additional info then feel free to post it below.


LVL 76

Expert Comment

by:Alan Hardisty
Good article - I can see this being very helpful to the EE Community at large.  Nice work.

Yes vote from me.

Alan : )
LVL 23

Expert Comment

by:Suliman Abu Kharroub
Nice article ...  vote yes.
LVL 10

Expert Comment

by:Muzafar Momin
good article : vote from me too
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

LVL 17

Expert Comment

by:Viral Rathod
Really Good Article ,you are a Autodiscover Champ.

Keep it up..vote from me too :)
LVL 31

Author Comment

@viralrathod - thanks

Expert Comment

Thanks for the article, Great Help
LVL 31

Author Comment

@ralfalpert - thanks

Expert Comment

This looks like a great solution.  Can anyone tell me what effects this will have on a live Exchange 2010 system with Outlook 2007 & 2003 clients?  Will users get errors or need to have their Outlook profiles reconfigured?  Thank you!
LVL 31

Author Comment

It won't have any effect on Outlook 2003 clients as they don't use autodiscover.

As for Outlook 2007 clients, you wouldn't be doing the above procedure unless you were having autodiscover issues, so after performing the above the Outlook 2007 clients will be able to contact autodiscover and retrieve settings(this normally happens after outlook is started)
LVL 23

Expert Comment

by:Stelian Stan
Very helpful. Thanks.

Expert Comment

Have done all these steps - worked fine.
But still get IIS 8.0 Error

HTTP Error 500.0 - Internal Server Error

Page appear when i try to access  https://exchangeasever.purtills.local/autodiscover/autodiscover.xml

get-ClientAccessServer |fl

shows uri to be https://exchangeasever.purtills.local/autodiscover/autodiscover.xml 

Help is needed thanks. :)

Expert Comment

Thank you for this, I found it very useful.

Expert Comment


Looks to be a great article but after following the steps, we are still getting

HTTP Error 404.0 - Not Found

The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.

Physical Path points to - C:\inetpub\wwwroot\autodiscover\autodiscover.xml



Expert Comment

by:Jesper Rex
I only needed to to follow Step 4 and change the Web.Config to use the actual path, instead of %ExchangeInstallDir%

This saved my day ;)

Featured Post

Amazon Web Services

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Check How effective MS Exchange Expert thinks Exchange Mailbox Recovery by SysTools IS. Visit the Official site to get detailed information:- https://www.systoolsgroup.com/exchange-recovery.html (https://www.systoolsgroup.com/exchange-recovery.h…
Other articles by this author

Keep in touch with Experts Exchange

Tech news and trends delivered to your inbox every month