Home » Exchange Server » PowerShell Script to Configure Exchange Server Client Access URLs

PowerShell Script to Configure Exchange Server Client Access URLs

ConfigureExchangeURLs.ps1 is a PowerShell script to make it quick and easy to configure the Client Access namespaces on your Exchange servers. The script is designed to apply the same namespace to all Client Access services on the server. You can specify different internal and external URLs. If you have a more complex namespace configuration to apply (for example separate namespaces for each service) then this script does not cater to your scenario, however you can probably adapt it your particular needs.

The script has some mandatory parameters:

  • -Server – The name(s) of the server(s) you are configuring.
  • -InternalURL – The internal namespace you are using.
  • -ExternalURL – The external namespace you are using.

There are some optional parameters as well, if you need them for your configuration. If you don’t use the optional parameters they default to the most common settings in my experience.

  • -AutodiscoverSCP – Used to specify a different Autodiscover namespace if required.
  • -InternalSSL – Specifies the internal SSL requirement for Outlook Anywhere. Defaults to True (SSL required).
  • -ExternalSSL – Specifies the external SSL requirement for Outlook Anywhere. Defaults to True (SSL required).

You can configure one or multiple servers at the same time. For example, to configure a single server:

To configure multiple servers:

To use a different Autodiscover namespace:

Download ConfigureExchangeURLs.ps1 from the TechNet Gallery or Github. Questions and feedback are welcome in the comments below.

Paul is a Microsoft MVP for Office Servers and Services. He works as a consultant, writer, and trainer specializing in Office 365 and Exchange Server. Paul is a co-author of Office 365 for IT Pros and several other books, and is also a Pluralsight author.
Category: Exchange Server


  1. Juancho says:

    Hi Paul, thanks for magnificent contribution!

    According to TechNet “If the DefaultAuthenticationMethod parameter is specified, InternalClientAuthenticationMethod, ExternalClientAuthenticationMethodand IISAuthenticationMethodsparameters cannot be used” What if, you need to reverse that and you need/want to use Internal, External and IISAuthentication again?

    Also if you enter Get-OutlookAnywhere | fl DefaultAuthenticationMethod nothing happens. Is there a way to know if DefaultAuthentication has been set?


  2. Morteza says:

    Hi Paul
    I uses your script and change all of URL
    but when outlook want to connect to server again try to connect with local address

  3. Ray Hicks says:

    I used these recently to configure a new 2016 deployment, thank you!

    it maybe worth noting that I had a number of these commands scripted for a 2013 deployment I did a while ago but that did not seem sufficient when I was on this 2016 deployment, so I sought help and found your scripts. After running the scripts I had to recreate the outlook profile on my test machine to clear a certificate error I was getting.

    though I did look through the script I have not bothered to figure what I was missing! These are so good they are my ‘go to’ now.


  4. Alex says:

    Hi Paul,

    great script!
    Just something to point out: after the execution, the MAPI authentication settings get lost.
    I don’t think this nothing to do with your script btw, since the settings are lost in any case even if you change the URL within the EAC.
    Keep up the good work!


Leave a Reply

Your email address will not be published. Required fields are marked *