External/Internal virtual directories URLs in Exchange 2010 with Powershell

External/Internal virtual directories URLs in Exchange 2010 with Powershell

Exchange 2010 has the concept of internal and external URL's for various virtual directories for the Client Access Server (CAS role).

You must correctly specify values for URLs because of potential issues with certificates and discoverability of Exchange services for your users.

Here are commandlets in powershell to control all virtual directories URLs in Exchange 2010 (most or all of them are also will work in Exchange 2013):

  

get-AutodiscoverVirtualDirectory 
get-ClientAccessServer 
get-webservicesvirtualdirectory 
get-oabvirtualdirectory 
get-owavirtualdirectory 
get-ecpvirtualdirectory 
get-ActiveSyncVirtualDirectory

You can add "| fl" after every command to get all properties listed.

I prefer to enter all values manually, but you prepare a script to automate routine operations. It will look like that:

$urlpath = "owa.domain.com" #enter your domain FQDN
$servername = "ex-cas16-1";
Get-ClientAccessServer -Identity $servername | Set-ClientAccessServer –AutodiscoverServiceInternalUri "$urlpath/autodiscover/autodiscover.xml"
Get-WebServicesVirtualDirectory -ADPropertiesOnly -Server $servername | Set-WebServicesVirtualDirectory -InternalUrl "$urlpath/ews/exchange.asmx" -ExternalUrl "$urlpath/ews/exchange.asmx"
Get-OabVirtualDirectory -ADPropertiesOnly -Server $servername | Set-OabVirtualDirectory -InternalUrl "$urlpath/oab" -ExternalUrl "$urlpath/oab"
Get-OwaVirtualDirectory -ADPropertiesOnly -Server $servername | Set-OwaVirtualDirectory -InternalUrl "$urlpath/owa" -ExternalUrl "$urlpath/owa"
Get-EcpVirtualDirectory -ADPropertiesOnly -Server $servername | Set-EcpVirtualDirectory -InternalUrl "$urlpath/ecp" -ExternalUrl "$urlpath/ecp"
Get-ActiveSyncVirtualDirectory -ADPropertiesOnly -Server $servername | Set-ActiveSyncVirtualDirectory -InternalUrl "$urlpath/Microsoft-Server-ActiveSync" -ExternalUrl "$urlpath/Microsoft-Server-ActiveSync"
Get-AutodiscoverVirtualDirectory -ADPropertiesOnly -Server $servername | Set-AutodiscoverVirtualDirectory -InternalUrl "$urlpath/autodiscover/autodiscover.xml" -ExternalUrl "$urlpath/autodiscover/autodiscover.xml" 

  

exchange (en), exchange 2010 (en)

  • Hits: 8277
Add comment

Related Articles