One of the issues you will run into when migrating from an on premises Exchange 2010 server on SBS 2011 is that Outlook will not autodiscover the correct Office 365 server settings. Fortunately this can be easily solved with a few simple PowerShell commands.
- Open an Exchange Management Shell as an administrator. (Elevated PowerShell)
- Use the following command to discover the Identity name of your Autodiscover Virtual Directory. Either note or copy the values in the Identity field.
[highlight]Get-AutodiscoverVirtualDirectory | fl Name, Server, InternalUrl, Identity[/highlight]
- Use the following command to remove the AutoDiscover Virtual Directory. Be sure to replace the text inside the quotes with the value in the Identity field above.
[highlight]Remove-AutodiscoverVirtualDirectory –Identity “Insert identity value here”[/highlight]
- You will have to confirm the removal by hitting Y for yes when prompted. You can double check to see if this worked properly by rerunning the command in step 2. You should get a blank result if successful.
That should be it. Your Outlook clients should connect successfully to the Office 365 service.
Hat Tip to mcbsys.com for pointing me in the right direction.
Will this break RWW? I need RDP to work remotely
Hi Tom,
No. This should not break RWW. I’ve successfully implemented this on servers where we use RWW & RDP over HTTPS.
How do I re-add this after removing it, seems to have broken my migration link with office 365
Did you ever find a way to get your migration link working? I am in the same situation.
Thanks!
Will these step require me to disable Exchange On-prem?
Absolutely awesome! I’ve been looking for this for 3 months. We do lots of these migrations and have needed this. Thanks again!
I just wanted to say thank you, we have run into this problem with sbs2011 a number of times and spent hours on the phone with microsoft. They never had a fix for us and your solution worked across the board. Thank you again. If your ever in San Antonio, TX i owe you a drink
I as well have been looking for this solution, but It is not working for me. I am getting object can not be found errors when I put in the identity.
the error is:
The opperation couldn’t be preformed because object ‘EFM-SERVER\Autodicover ‘ Couldn’t be found on ‘EFM-SERVER.marburger.local’.
I read that others have the same issue, and some fixed it by reinstalling exchange.
Hi Peter,
The only thing I’m noticing is that you misspelled Autodiscover. Was that just a misspelling on the comment, or was it misspelled in the powershell command?
It was just on the comment
Could you send me a screenshot of what powershell outputs on step 2 above?
sure, through twitter?
Sure. Or via email [email protected]
i know its obselete by now but for the future use
New-AutodiscoverVirtualDirectory -WebSiteName “Default Web Site”
dis recreated the entry without any url which you aint need anyway. autodiscover dont need urls
This was great. I lost a bunch of time looking everywhere going crazy before I found this. Thank you!
Your command broke powershell commands, thanks for not including it in your how to…
BEWARE do not run these commands if you still need to use EMS.
Hey, good tutorial. Thanks for the help!
Not sure if Peter ever found his answer but when I ran into that make sure you have the Identity in quotes: “\Autodiscover (Default Web Site)”
That fixed it for me easily.
Not sure why but the was removed from my last post. Should look like this:
Remove-AutodiscoverVirtualDirectory –Identity “SRV\Autodiscover (Default Web Site)”
Thank you BTW Kirby, this worked great.
Kirby,
Came accross this article the other week and have applied the script. However, my Outlook clients still connect to SBS 2011 Exchange. In the AD under Sites and services the Exchange Administrative Group still has the Autodiscover entry in the Server containter which has the binding to the local Exchange.
Does this container need to be deleted?
When I went back to EMC to restore the Autodiscover VM it now doesn’t have the option for this VM listed. Not really a problem I guess because somehow Outlook still finds the server.
Am I missing something?
Tried a number of times with Wipro from Office365 but they don’t seem to understand the problem.
Appreciate any guidance
G
Hi I have applied this to the sbs2011 server and the original check for the setting comes up blank but mail32bit outlook 2016 is still finding the on premise exchange.
1. do I have to reboot the server as well?
2. disable the on premise exchange?
To undo in case you need to sync again use
New-AutodiscoverVirtualDirectory -WebSiteName “Default Web Site”
Deleting the entry enables your outlookclient to connets to office 365 but also break sync functionality from premise to office365
Thanks for the article. Solved my problem.
Worked like a charm for my SBS 2011 migration. There are so many different articles out there to fix it, but this one did the trick and undoing it seems simple enough it it did break anything. Thanks!
I’ve searched a long time for this command. Works great und helped me a lot.
Thanks and best wishes
Marcus
Thank you! You’ve saved me 2hrs…
I went a different route for my setup that works much easier than the above. Go to IIS and stop the Autodiscover App pool. Then go to services and stop the Exchange active directory topology.
Then disable just disable it, the outlook clients will connect to 365 using autodiscover.
I like this idea – it’s more reversible if there’s a problem – just about to give it a try!
Nathan, I used your solution. It worked well. Thanks!
THen just disable what?
This is the most straight forward solution to this problem. Thanks!!
Kirb, thank you, thank you, thank you!!! I owe you a beer if you’re ever in Nova Scotia! Thanks so much! You saved me BIG time!
Thanks, very helpfull, just migrating a customer to 365, so hope everything works for me on monday when they arrive in the office. It works on my test VM on their internal network.
Working perfectly – no more issues with connecting to the sbs exchange when setting up outlook
It works but I have an issue.
When I try to configure the O365 new account on Outlook, I received the error : “connection is not secure / not encrypted”
My SBS2011 has a self-signed certificate and DNS was configured for .local domain with another dns zone (remote.domain.com) (for public domain).
Certificate was self-signed
Maybe I have to delete the dns public dns zone ?
Server was not exposed to internet. We uses POP3 Connector to retrieve emails from old provider