• Home
  • About
  • Blog
  • Books
  • Training
  • Subscribe
  • Advertise
  • Contact
    • Email
    • Facebook
    • Twitter
    • RSS

Practical 365

  • Office 365
  • Exchange 2019
  • Exchange 2016
  • Exchange 2013
  • Hybrid
  • Certificates
  • PowerShell
  • Migration
You are here: Home / Exchange Server / PowerShell Script to Configure Exchange Server Client Access URLs

PowerShell Script to Configure Exchange Server Client Access URLs

August 27, 2015 by Paul Cunningham 16 Comments

Share5
Share5
Tweet
+11
Shares 11

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:

1
.ConfigureExchangeURLs.ps1 -Server sydex1 -InternalURL mail.exchangeserverpro.net -ExternalURL mail.exchangeserverpro.net

To configure multiple servers:

1
.ConfigureExchangeURLs.ps1 -Server sydex1,sydex2 -InternalURL mail.exchangeserverpro.net -ExternalURL mail.exchangeserverpro.net

To use a different Autodiscover namespace:

1
.ConfigureExchangeURLs.ps1 -Server sydex1,sydex2 -InternalURL mail.exchangeserverpro.net -ExternalURL mail.exchangeserverpro.net -AutodiscoverSCP autodiscover.exchangeserverpro.net

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

Paul Cunningham

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.

Share5
Share5
Tweet
+11
Shares 11

Exchange Server Client Access, Exchange 2013, Exchange 2016, PowerShell, Scripts

Comments

  1. David says

    September 5, 2015 at 5:30 am

    What is the difference between this script and the Virtual Directory configure external access domain tool?

    Reply
    • Paul Cunningham says

      September 6, 2015 at 12:22 pm

      I cover that in an article here:
      https://practical365.com/exchange-server-2016-client-access-namespace-configuration/

      Reply
  2. Juancho says

    September 27, 2015 at 2:23 pm

    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?

    Thanks!!

    Reply
  3. Morteza says

    February 25, 2016 at 4:17 am

    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
    mail.domain.local

    Reply
    • Morteza says

      February 25, 2016 at 5:41 am

      and also repeatedly need password

      Reply
  4. Windozgeek says

    July 21, 2016 at 4:00 am

    Thank you for this, works great.
    Much appreciated

    Reply
  5. Mahmoud says

    August 31, 2016 at 8:02 pm

    could you please make other one with
    The default authentication basic

    Reply
    • Paul Cunningham says

      August 31, 2016 at 9:01 pm

      You’re allowed to edit the script to suit your needs.

      Reply
  6. HB says

    November 24, 2016 at 1:47 am

    what about setting internal and external auth?

    Reply
    • Paul Cunningham says

      November 24, 2016 at 8:01 am

      What exactly do you want to know?

      Reply
  7. Ray Hicks says

    December 3, 2016 at 2:36 am

    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.

    cheers.

    Reply
  8. Jean-Luc says

    December 6, 2016 at 1:01 am

    Hi Paul,

    When you do not use “AdPropertiesOnly” there are DCOM errors.
    Do you know why?
    Best regards

    Reply
    • Paul Cunningham says

      December 6, 2016 at 11:55 am

      No. Sounds like something wrong in your environment though. Using -AdPropertiesOnly just speeds things up a bit.

      Reply
  9. Alex says

    December 19, 2016 at 8:17 pm

    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!

    Regards,
    Alex

    Reply
    • Paul Cunningham says

      December 19, 2016 at 11:14 pm

      Which version and build of Exchange?

      Reply
      • Alex says

        December 22, 2016 at 7:29 pm

        2016 standard CU3, v15.1 (build 544.27).
        Thanks,
        Alex

        Reply

Leave a Reply Cancel reply

Recent Articles

  • You Can Stop Deploying Exchange Server 2013 Now
  • Automating New User Account On-boarding Using SharePoint Online, Flow, and PowerApps
  • March 2018 Updates Released for Exchange Server
  • Securing Administrator Access with Privileged Identity Management for Azure Active Directory
  • The Junkings will Continue Until Morale Improves
Practical 365

Popular Articles

Microsoft Recommending Non-Expiring Passwords to Office 365 CustomersMicrosoft Recommending Non-Expiring Passwords to Office 365 Customers
PowerShell Scripts for Office 365PowerShell Scripts for Office 365
MeetEasier Helps Your Users Find Available Meeting RoomsMeetEasier Helps Your Users Find Available Meeting Rooms
PowerShell: Listing Azure AD/Office 365 User Accounts with Directory Sync StatusPowerShell: Listing Azure AD/Office 365 User Accounts with Directory Sync Status
First Steps: Configuring Exchange Online ProtectionFirst Steps: Configuring Exchange Online Protection

eBooks and Training

  • Office 365 for IT Pros
  • Exchange Server Troubleshooting Companion
  • Migrating to Exchange Server 2016
  • Exchange 2016 Exam 70-345
  • Managing Exchange Mailboxes and Distribution Groups in PowerShell
  • Exchange 2013 Boot Camp
  • Exchange 2010 Boot Camp

Recommended Resources

  • Office 365 Books
  • Exchange Server Books
  • Exchange PowerShell Scripts
  • Exchange Analyzer
  • Exchange 2010 to 2013 Migration
  • Exchange 2003 to 2010 Migration
  • Exchange 2007 to 2010 Migration
  • Digicert SSL Certificates

About This Site

Practical 365 is a leading site for Office 365 and Exchange Server news, tips and tutorials, run by Paul Cunningham, Microsoft MVP, author, speaker, and consultant. Read more...

To stay up to date:
  • Subscribe to the email newsletter
  • Follow @Practical365 on Twitter
  • Like us on Facebook
  • Write for Us

Copyright © 2018 LockLAN Systems Pty Ltd · Disclosure · Privacy Policy · Advertise
PO BOX 7002, Hemmant, Queensland 4174 · ABN: 25 121 101 255

We are an Authorized DigiCert™ SSL Partner.