Configure Exchange 2007 external URLs

 

Estimated time to complete: 10 minutes

When a user with an Exchange 2007 mailbox connects to your Exchange 2013 Client Access server, Exchange 2013 will redirect the connection to the Exchange 2007 Client Access server. To do this redirection, the Exchange 2013 server uses the external hostname configured on the Exchange 2007 server's Outlook Web Access, Exchange Web Services, Exchange ActiveSync, Offline Address Book, and Unified Messaging virtual directories and the internal hostname for the Exchange ActiveSync virtual directory. The external and internal hostnames of the Exchange 2007 server need to be different from the hostnames of the Exchange 2013 server and need to be pointed to the Exchange 2007 server.

Warning

The commands in this step overwrite the value stored in the ExternalUrl property of the Outlook Web Access, Exchange Web Services, Exchange ActiveSync, Offline Address Book, and Unified Messaging virtual directories on all the Exchange 2007 Client Access servers in your organization. They also overwrite the value stored in the InternalUrl property of the Exchange ActiveSync virtual directory.

How do I do this?

  1. Open the Shell on the Exchange 2007 Client Access server.

  2. Run the commands in the "How do I know this worked" section to retrieve the current values of the ExternalUrl property of the Outlook Web Access, Exchange Web Services, Exchange ActiveSync, Offline Address Book, and Unified Messaging virtual directories. Do the same for the InternalUrl property of the Exchange ActiveSync virtual directory. Make note of these values in case you need to revert back to them.

  3. Store the external host name of your Exchange 2007 Client Access server in a variable that will be used in the next steps. For example, legacy.contoso.com.

    $ExternalLegacyHostName = "legacy.contoso.com"
    
  4. Store the internal host name of your Exchange 2007 Client Access server in a variable that will be used in the next steps. If the internal and external hostnames of the Exchange 2007 Client Access server are the same, set this to be the same value as ExternalLegacyHostName. For example, legacy.contoso.com. If they're different, set this to be the internal hostname of the Exchange 2007 Client Access server. For example legacyinternal.contoso.com. The command below assumes you want to set both the external and internal hostnames to be the same.

    $InternalLegacyHostName = "legacy.contoso.com"
    
  5. Run the following command to store a list of all of the Exchange 2007 Client Access servers in your organization. This list of servers will be used in the next several commands.

    $Exchange2007Servers = Get-ExchangeServer | Where {($_.AdminDisplayVersion -Like "Version 8*") -And ($_.ServerRole -Like "*ClientAccess*")}
    
  6. Run the following command to configure the external URL of the Outlook Web App virtual directory on the Exchange 2007 Client Access server using the external host name you stored in the $ExternalLegacyHostName variable.

    Get-OwaVirtualDirectory | Where {$_.OwaVersion -Eq "Exchange2007"} | Set-OwaVirtualDirectory -ExternalUrl https://$ExternalLegacyHostName/owa
    
  7. Run the following command to configure the external URL of the Exchange Web Services virtual directory on the Exchange 2007 Client Access server using the external host name you stored in the $ExternalLegacyHostName variable.

    $Exchange2007Servers | Get-WebServicesVirtualDirectory | Set-WebServicesVirtualDirectory -ExternalUrl https://$ExternalLegacyHostName/EWS/Exchange.asmx
    
  8. Run the following command to configure the external URL of the Unified Messaging virtual directory on the Exchange 2007 Client Access server using the external host name you stored in the $ExternalLegacyHostName variable.

    $Exchange2007Servers | Get-UMVirtualDirectory | Set-UMVirtualDirectory -ExternalUrl https://$ExternalLegacyHostName/UnifiedMessaging/Service.asmx
    
  9. Run the following command to configure the external URL of the Offline Address Book virtual directory on the Exchange 2007 Client Access server using the external host name you stored in the $ExternalLegacyHostName variable.

    $Exchange2007Servers | Get-OABVirtualDirectory | Set-OABVirtualDirectory -ExternalUrl https://$ExternalLegacyHostName/OAB
    
  10. Run the following command to configure the internal URL of the Exchange ActiveSync virtual directory on the Exchange 2007 Client Access server using the internal host name you stored in the $InternalLegacyHostName variable.

    $Exchange2007Servers | Get-ActiveSyncVirtualDirectory | Set-ActiveSyncVirtualDirectory -InternalUrl https://$InternalLegacyHostName/Microsoft-Server-ActiveSync
    
  11. If you've installed Exchange 2013 in the same site as your Exchange 2007 Client Access server, run the following command to remove the external URL of the Exchange ActiveSync virtual directory on the Exchange 2007 Client Access server.

    $Exchange2007Servers | Get-ActiveSyncVirtualDirectory | Set-ActiveSyncVirtualDirectory -ExternalUrl $Null
    

How do I know this worked?

  1. Run the following command to verify that the external URL of the Outlook Web Access virtual directory on all the Exchange 2007 servers in your organization has been configured correctly.

    Get-OwaVirtualDirectory | Where {$_.OwaVersion -Eq "Exchange2007"} | Format-Table Server, ExternalUrl -Auto
    
  2. Run the following command to verify that the external URL of the Exchange Web Services virtual directory on all the Exchange 2007 servers in your organization has been configured correctly.

    $Exchange2007Servers | Get-WebServicesVirtualDirectory | Format-Table Server, ExternalUrl -Auto
    
  3. Run the following command to verify that the external URL of the Unified Messaging virtual directory on all the Exchange 2007 servers in your organization has been configured correctly.

    $Exchange2007Servers | Get-UmVirtualDirectory | Format-Table Server, ExternalUrl -Auto
    
  4. Run the following command to verify that the external URL of the Offline Address Book virtual directory on all the Exchange 2007 servers in your organization has been configured correctly.

    $Exchange2007Servers | Get-OABVirtualDirectory | Format-Table Server, ExternalUrl -Auto
    
  5. Run the following command to verify that the external URL of the Exchange ActiveSync virtual directory on all the Exchange 2007 servers in your organization has been configured correctly. If you installed Exchange 2013 in the same site as your Exchange 2007 Client Access servers, the values should be empty.

    $Exchange2007Servers | Get-ActiveSyncVirtualDirectory | Format-Table Server, ExternalUrl -Auto
    
  6. Run the following command to verify that the internal URL of the Exchange ActiveSync virtual directory on all the Exchange 2007 servers in your organization has been configured correctly.

    $Exchange2007Servers | Get-ActiveSyncVirtualDirectory | Format-Table Server, InternalUrl -Auto
    

Having problems? Ask for help in the Exchange forums. Visit the forums at: Exchange Server, Exchange Online, or Exchange Online Protection.