Change Outlook Anywhere Settings on Exchange 2010

Xavier Mustin

Administrator
Staff member
#1
Outlook Anywhere URL
Right click on the Client Access Server and choose Properties. Click on the tab Outlook Anywhere and adjust the URL to match the external name on the SSL certificate.

Cycle the Exchange Services
After making the changes, cycle the Exchange services to ensure that the changes are live.

Script for the Above
Using the power of PowerShell, the above changes can be easily scripted.
Copy the text below in to a new notepad document and modify the two lines at the top - remember to leave the " in place. Then it as a file name ending in ps1 - for example URLs.ps1 on the Exchange server itself.

Start Exchange Management Shell and run this command first:

Set-ExecutionPolicy "RemoteSigned"

That will allow the script to be run, as it isn't signed.
Then you can run the script - the best way is to CD to the directory and then use tab - and EMS will recognise the script.

This is a modified version of the script, suitable for running in a domain with multiple Exchange installations, and would need to be customised for each server.



Code:
#Change this value to match the name of the external certificate
$URLName="mail.example.net"
#Change this value to match the real name of the server
$ComputerName="exch-svr"

Get-ClientAccessServer $ComputerName | Set-ClientAccessServer -AutodiscoverServiceInternalUri https://$URLNAME/autodiscover/autodiscover.xml
Get-WebServicesVirtualDirectory -Server $ComputerName | Set-WebServicesVirtualDirectory -InternalUrl https://$URLNAME/ews/exchange.asmx -ExternalUrl https://$URLNAME/ews/exchange.asmx
Set-OWAVirtualDirectory -identity "$computername\owa (Default Web Site)" -InternalURL https://$URLNAME/owa -ExternalURL https://$URLNAME/owa
Get-OABVirtualDirectory -Server $ComputerName | Set-OABVirtualDirectory -InternalURL https://$URLNAME/OAB -ExternalURL https://$URLNAME/OAB
Get-ECPVirtualDirectory -Server $ComputerName | Set-ECPVirtualDirectory -InternalURL https://$URLNAME/ECP -ExternalURL https://$URLNAME/ECP
Get-ActiveSyncVirtualDirectory -Server $ComputerName | Set-ActiveSyncVirtualDirectory -InternalURL https://$URLNAME/Microsoft-Server-ActiveSync -ExternalURL https://$URLNAME/Microsoft-Server-ActiveSync
Set-OutlookAnywhere -identity "$computername\RPC (Default Web Site)" -ExternalHostname $URLNAME
Testing
To test the configuration, use Outlook 2007 or higher on a workstation.
Start Outlook and wait for it to connect.

Then hold down CTRL and right click on the Outlook icon in the system tray next to your clock. Choose "Test Email AutoConfiguration�" Then select the option to test the configuration.
Should you have everything configured correctly, then all of the URLs should appear as your external certificate name and you do not get any certificate prompts.

MSSTD URL
If the URL for Outlook Anywhere under MSSTD is not correct, then you may have to set that manually.
To do that, use the following command in EMS:
Code:
Set-OutlookProvider expr -CertPrincipalName:"msstd:mail.example.net"
Version for Exchange 2013
 
Haut