Managing Exchange 2010 External/Internal URL's via PowerShell

Managing Exchange 2010 External/Internal URL's via PowerShell

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

It is important to specify the correct values as as the SAN certificates will need to match otherwise you will encounter use issues.

Below commmands in powershell will list all the information related to virtual directory and their respective URLS.

get-AutodiscoverVirtualDirectory 
get-ClientAccessServer
get-webservicesvirtualdirectory
get-oabvirtualdirectory
get-owavirtualdirectory
get-ecpvirtualdirectory
get-ActiveSyncVirtualDirectory Add "| Fl" to the Cmdlets to see all the properties

To set the URL's for all directories at once, run the following powershell commands (save it as a .ps1 extension and run it in EMS)

For internal URLs:

$urlpath = Read-Host "Type internal Client Access FQDN starting with http:// or https://" 
Set-ClientAccessServer –Identity * –AutodiscoverServiceInternalUri “$urlpath/autodiscover/autodiscover.xml” 
Set-webservicesvirtualdirectory –Identity * –internalurl “$urlpath/ews/exchange.asmx”
Set-oabvirtualdirectory –Identity * –internalurl “$urlpath/oab”
Set-owavirtualdirectory –Identity * –internalurl “$urlpath/owa”
Set-ecpvirtualdirectory –Identity * –internalurl “$urlpath/ecp”
Set-ActiveSyncVirtualDirectory -Identity * -InternalUrl "$urlpath/Microsoft-Server-ActiveSync"

External URLs:

Set-ClientAccessServer –Identity * –AutodiscoverServiceExternalUri “$urlpath/autodiscover/autodiscover.xml” 
Set-webservicesvirtualdirectory –Identity * -ExternalUrl “$urlpath/ews/exchange.asmx”
Set-oabvirtualdirectory –Identity * –ExternalUrl “$urlpath/oab”
Set-owavirtualdirectory –Identity * –ExternalUrl “$urlpath/owa”
Set-ecpvirtualdirectory –Identity * –ExternalUrl “$urlpath/ecp”
Set-ActiveSyncVirtualDirectory -Identity * -ExternalUrl "$urlpath/Microsoft-Server-ActiveSync"
Leave a Comment
  • Please add 7 and 6 and type the answer here:
  • Post
Wiki - Revision Comment List(Revision Comment)
Comments
  • steve siyavaya edited Revision 2. Comment: The Autodiscover Virtual Directory URL settings are not used

Page 1 of 1 (1 items)
Wikis - Comment List
Posting comments is temporarily disabled until 10:00am PST on Saturday, December 14th. Thank you for your patience.
Comments
  • steve siyavaya edited Revision 2. Comment: The Autodiscover Virtual Directory URL settings are not used

  • Good!

Page 1 of 1 (2 items)