Condividi tramite


Exchange 2007, 2010 and 2013 – Powershell script to dump InternalURLs and ExternalURLs of basic Exchange services

Update: added a slightly modified version of the script to dump these way quicker by using the -ADPropertiesOnly switch along with the Get-WhicheverVirtualDirectory commandlets - this switch doesn't work on Exchange 2007, only works on Exchange 2010 and 2013 (and hopefully Exchange 2016 ;-)) and only reads the URLs in the local GC instead of reading these in each server's IIS "metabase".

Hey all,

 

Here is a script to dump the Internal and External URL properties from the main Exchange services.

This script has been designed and tested to work out of the box on an Exchange 2010 environment, but it may work on Exchange 2007 and Exchange 2013 as well.

Why these properties ? Because on many engagements, I found that these URLs were not properly set, leading to users or servers latencies, performance issues, proxy or redirection not working between Active Directory sites, …

 

Look at the URL configuration tables on the below link, which are Microsoft’s recommendations to set correctly your URLs whether you have a Load Balancer or not:

Understanding Proxying and Redirection https://technet.microsoft.com/en-us/library/bb310763(v=exchg.141).aspx

 

Virtual directory /service InternalURL ExternalURL (Internet-facing Active Directory site) ExternalURL (non-Internet-facing Active Directory site)
/OWA NLB FQDN NLB FQDN $null
/ECP NLB FQDN NLB FQDN $null
/Microsoft-Server-ActiveSync NLB FQDN NLB FQDN $null
/OAB NLB FQDN NLB FQDN $null
/EWS NLB FQDN NLB FQDN $null
POP/IMAP (InternalConnectionsSettings) NLB FQDN Not applicable Not applicable

 

Don’t forget to double check your certificates as well, they should contain all the above used URLs.

 

The below script will dump the Internal and External URLs for the above services to that you’ll be able to check if your environment has been configured correctly (trust me, it’s worth to triple-check because for lots of my customers we saw surprises, that explained some user or server performance issues we had at that time).

 

This type of script is pretty common among administrators, pretty straightforward, anyways I tried to comment the script so that it’s understandable by anyone, but leave me comments and suggestions if you don’t understand something…

 

You can either copy-paste the below lines (but the formatting will be a bit weird), or download the script from the following link.

Download the script without the -ADPropertiesOnly switch (slower, works on all Exchange versions)

Download the script with the -ADPropertiesOnly switch (way faster, works on Exchange 2010, 2013+)