Get Exchange Server URLs and Authentication Settings with PowerShell

The original GetExchangeURLs.ps1 script was written by Paul Cunningham to provide a simple way to display Exchange Server Client Access URLs from a single PowerShell script.

Ali Tajran later updated the script to version 1.10, adding the PowerShell virtual directory and reorganizing the output.

I recently revisited the script and decided to continue the same approach rather than create a completely new one. The result is GetExchangeURLs-v2.ps1.

View / Download the PowerShell Script

View script   |   Download GetExchangeURLs-v2.ps1

The script can be reviewed in the browser or downloaded using the GetExchangeURLs-v2.ps1 filename.

Version 2 keeps the original read-only URL reporting concept, but updates and extends it with additional options for authentication visibility, service filtering, multi-server output, grouping, and text-file export.

What Changed in Version 2

The main changes added in Version 2 are:

  • Replaced the legacy Get-ClientAccessServer cmdlet with Get-ClientAccessService.
  • Added Autodiscover virtual directory information in addition to the Autodiscover SCP.
  • Added optional authentication reporting with -IncludeAuthentication.
  • Added service filtering, for example -Service MAPI,EWS.
  • Added -GroupBy Server and -GroupBy Service output modes.
  • Made the -Server parameter optional so Exchange Mailbox servers can be discovered automatically.
  • Added optional text-file output with -OutputFile.
  • Added explicit N/A and Not Configured states instead of leaving values ambiguous.

The script remains read-only and does not make any Exchange configuration changes.

Get Exchange Server URLs

The basic usage is:

PowerShell
.\GetExchangeURLs-v2.ps1 -Server EX601

The script displays the Client Access configuration for Autodiscover, ECP, EWS, MAPI, ActiveSync, OAB, OWA, PowerShell, and Outlook Anywhere. It also shows the Exchange Server FQDN, version, and edition.

GetExchangeURLs-v2 PowerShell script displaying default Exchange Server Client Access URLs on EX601

The default output is intentionally simple and focuses on URLs and namespace-related values without adding authentication details.

The script also distinguishes between two different conditions. Not Configured means the property exists but currently has no configured value. N/A means that the property is not applicable or is not exposed by that Exchange component.

This avoids treating every empty value as the same condition.

Include Authentication Settings

Authentication information is optional and is not shown in the default output.

To include it, use:

PowerShell
.\GetExchangeURLs-v2.ps1 -Server EX601 -IncludeAuthentication
GetExchangeURLs-v2 PowerShell script displaying Exchange Server Client Access URLs and authentication settings on EX601

Depending on the Exchange component, the script can display authentication properties such as:

  • Basic Authentication
  • Windows Authentication
  • Forms Authentication
  • Digest Authentication
  • OAuth Authentication
  • ADFS Authentication
  • WS-Security Authentication
  • Certificate Authentication
  • IIS Authentication Methods

Exchange components do not expose exactly the same authentication properties. Instead of hiding those differences, the script displays non-applicable properties as N/A.

Filter Specific Services

The complete Client Access configuration is not always required. The -Service parameter can limit the output to selected components.

For example, to display only MAPI and EWS:

PowerShell
.\GetExchangeURLs-v2.ps1 -Server EX601 -Service MAPI,EWS

Authentication information can be included at the same time:

PowerShell
.\GetExchangeURLs-v2.ps1 -Server EX601 -Service MAPI,EWS -IncludeAuthentication

Multiple services can be supplied in the same command.

Group Results by Server or Service

By default, results are grouped by Exchange Server.

These options can be used separately or combined depending on what you want to compare:

PowerShell
# Group by server
.\GetExchangeURLs-v2.ps1 -Server EX601,EX602

# Group by service
.\GetExchangeURLs-v2.ps1 -Server EX601,EX602 -GroupBy Service

# Filter services, group by service, and include authentication
.\GetExchangeURLs-v2.ps1 -Server EX601 -Service MAPI,EWS -GroupBy Service -IncludeAuthentication
GetExchangeURLs-v2 PowerShell script grouping MAPI and EWS configuration by service on EX601

With multiple Exchange servers, the same command places each server under the corresponding service. This provides a cleaner view when comparing the same configuration across servers.

Query All Exchange Servers

The -Server parameter is optional.

If -Server is omitted, the script discovers the Exchange Mailbox servers automatically. You can still limit the query to specific servers when needed:

PowerShell
# Query all Exchange Mailbox servers
.\GetExchangeURLs-v2.ps1

# Query specific servers
.\GetExchangeURLs-v2.ps1 -Server EX601,EX602

Save the Output to a File

The formatted output can be written to a text file, and the same option can be combined with the other parameters:

PowerShell
# Save one server to a text file
.\GetExchangeURLs-v2.ps1 -Server EX601 -OutputFile C:\Temp\ExchangeURLs.txt

# Combine multiple options and save the output
.\GetExchangeURLs-v2.ps1 -Server EX601,EX602 -Service MAPI,EWS -GroupBy Service -IncludeAuthentication -OutputFile C:\Temp\ExchangeURLs.txt

The same formatted information displayed in the console is written to the specified file.

Conclusion

GetExchangeURLs-v2.ps1 continues the original script rather than replacing its approach. The goal of Version 2 is to preserve the simplicity of the original URL-reporting script while extending it with current cmdlets and additional optional capabilities.

The default command still provides a compact view of Exchange Server Client Access URLs. When required, authentication settings, service filtering, server or service grouping, automatic server discovery, and text-file output can be enabled through optional parameters.

References

2 thoughts on “Get Exchange Server URLs and Authentication Settings with PowerShell

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.