Autodiscover configuration for Hosted Exchange 2010 on Powershell

You need to create an Autodiscover directory in IIS and configure it. What I do with this script is creating that directory and configuring for redirection.

1
2
3
4
5
6
7
8
New-Item "C:\inetpub\Autodiscover_redirect" -type Directory
New-Item "C:\inetpub\Autodiscover_redirect\Autodiscover" -type Directory
New-Item "C:\inetpub\Autodiscover_redirect\Autodiscover\Autodiscover.xml"type File
Import-Module WebAdministration
Remove-WebBinding -Name “Default Web Site” -BindingInformation *:80:
New-ItemProperty IIS:\Sites\”Default Web Site” -name bindings -value @{protocol="http";bindingInformation="*:80:mail.yusufozturk.info"}
New-Item IIS:\Sites\Autodiscover -bindings (@{protocol="http";bindingInformation="*:80:"}) -PhysicalPath “C:\inetpub\Autodiscover_redirect"
Set-WebConfiguration -filter /system.webServer/httpRedirect -value (@{enabled="True"; destination="autodiscover.yusufozturk.info"}) -PSPath IIS:\ -location Autodiscover

You won’t get any SSL error on Outlook after changes.

Tags: , , , ,


You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

AddThis Social Bookmark Button

3 Responses to “Autodiscover configuration for Hosted Exchange 2010 on Powershell”

  1. G’day Yusuf,

    I’ve installed a hosted Exchange 2010 environment which is working well, except for the Autodiscover issue.

    Even though I’ve created the Autodiscover_redirect site and have configured it correctly, I still can’t get this working.

    I have two issues …

    By default, Exchange 2010 has installed an Autodiscover virtual directory under the default website. Do I need to remove that virtual directory and create a new Autodiscover site?

    And, if I bind an IP to the default website, it breaks EMC. It’s OK if I bind an IP to 443, but not to 80. And if I remove the 80 binding from the Default website, then EMC breaks again.

    So I’m stuck. Can you offer come advice?

    Bear in mind, I need to tread carefully because we already have clients live on the installation so I can’t afford to break anything.

    Thanks,

    Kerry

  2. Sorry for that Kerry. You are right, this script breaks EMC but I changed it after I saw the issue.

    I’ll post here when I go to office. We don’t have any Autodiscover issue right now, I hope we can fix your issue too.

  3. Hello Kerry,

    Here the solution:

    Your MX hostname: mail.yusufozturk.info
    Your Autodiscover hostname: autodiscover.yusufozturk.info

    Now, let’s start with DNS records:

    mail.yusufozturk IN A 10.10.10.1
    autodiscover.yusufozturk IN A 10.10.10.2

    As you see, you have to seperate mx hostname and autodiscover IP addresses.

    Then, IIS records:

    Configure Bindings as;

    Autodiscover:
    type: http
    hostname: blank
    port: 80
    ip address: 10.10.10.2

    Default Web Site:
    type: http
    hostname: blank
    port: 80
    ip address: 10.10.10.1

    Default Web Site:
    type: https
    hostname: blank
    port: 443
    ip address: 10.10.10.1

    Redirect Autodiscover requests to https://mail.yusufozturk.info/autodiscover/autodiscover.xml

    Also my Powershell script does redirect.

    It has to work. We have more than three different Exchange environments with using same configuration without problem. If you are still having issues, then you need to check your SSL configuration.

Leave a Reply