Tags


This will get your autodiscover service in Exchange 2007/2010 up and running.

Configure the EWS directory:
# Set-WebServicesVirtualDirectory -Identity “CAS01\EWS (Default Web Site)” -InternalUrl https://CAS01.contoso.local/EWS/Exchange.asmx -ExternalUrl https://mail.contoso.com/EWS/Exchange.asmx
# Set-WebServicesVirtualDirectory -Identity “CAS02\EWS (Default Web Site)” -InternalUrl https://CAS02.contoso.local/EWS/Exchange.asmx -ExternalUrl https://mail.contoso.com/EWS/Exchange.asmx

Configure the OWA directory:
# Set-OwaVirtualDirectory -Identity “CAS01\Owa (Default Web Site)” -InternalUrl https://CAS01.contoso.local/owa -ExternalUrl https://mail.contoso.com/oab
# Set-OwaVirtualDirectory -Identity “CAS02\Owa (Default Web Site)” -InternalUrl https://CAS02.contoso.local/owa -ExternalUrl https://mail.contoso.com/oab

Configure the OAB directory:
# Set-OABVirtualDirectory -Identity “CAS01\OAB (Default Web Site)” -InternalUrl https://CAS01.contoso.local/oab -ExternalUrl https://mail.contoso.com/oab
# Set-OABVirtualDirectory -Identity “CAS02\OAB (Default Web Site)” -InternalUrl https://CAS02.contoso.local/oab -ExternalUrl https://mail.contoso.com/oab

Configure AutodiscoverUri:
# Set-ClientAccessServer -Identity CAS01 -AutoDiscoverServiceInternalUri https://CAS01.contoso.local/autodiscover/autodiscover.xml
# Set-ClientAccessServer -Identity CAS02 -AutoDiscoverServiceInternalUri https://CAS02.contoso.local/autodiscover/autodiscover.xml

Test Outlook autodiscover:
# Test-OutlookWebServices -ClientAccessServer CAS01

My Test lab setting under below

EWS settings checking by using this command
[PS] C:\Windows\system32>Get-WebServicesVirtualDirectory |fl identity,internalurl,externalurl

Identity : CAS01\EWS (Default Web Site)
InternalUrl : https://mail.cas01.com/EWS/Exchange.asmx
ExternalUrl : https://mail.cas01.com/ews/exchange.asmx

Identity : CAS02\EWS (Default Web Site)
InternalUrl : https://mail.cas02.com/EWS/Exchange.asmx
ExternalUrl : https://mail.cas02.com/ews/exchange.asmx

Configuring EWS by using the command

Set-WebServicesVirtualDirectory -Identity “CAS01\EWS (Default Web Site)” -InternalUrl https://mail.testdomain.com/EWS/Exchange.asmx -BasicAuthentication:$true

If you are having two CAS server you have to run this command on both servers

[PS] C:\Windows\system32>Set-WebServicesVirtualDirectory -Identity “CAS02\EWS (Default Web Site)” -InternalUrl https://mail.testdomain.com/EWS/Exchange.asmx -BasicAuthentication:$true

For Autodiscover nad Out Of Office configuration

[PS] C:\Windows\system32>Get-ClientAccessServer |fl -Identity,autodiscoverserviceinternaluri

AutoDiscoverServiceInternalUri : https://mail.testdomain.com/Autodiscover/Autodiscover.xml

AutoDiscoverServiceInternalUri : https://mail.testdomain.com/Autodiscover/Autodiscover.xml

For Setting autodiscover by using shell
[PS] C:\Windows\system32>Set-ClientAccessServer -Identity CAS01 -AutoDiscoverServiceInternalUri https://mail.testdomain.com/Autodiscover/Autodiscover.xml
[PS] C:\Windows\system32>Set-ClientAccessServer -Identity CAS02 -AutoDiscoverServiceInternalUri https://mail.testdomain.com/Autodiscover/Autodiscover.xml