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.

Update – September 14, 2026

  • Added Alternate Service Account (ASA) visibility.
  • Added the simplified -GroupByService switch.
  • Improved default query performance by using -AdPropertiesOnly where applicable.
  • Simplified script processing and improved text-file output handling.

Version 2 keeps the original read-only URL reporting concept, but updates and extends it with authentication visibility, service filtering, automatic multi-server discovery, service grouping, Alternate Service Account (ASA) visibility, 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 -GroupByService for comparing the same service configuration across multiple Exchange servers.
  • Added Alternate Service Account (ASA) visibility in the Client Access Service output to help identify Kerberos-related configurations before migrations.
  • Uses -AdPropertiesOnly for default virtual directory queries to reduce unnecessary IIS lookups. Full authentication and IIS-backed settings are queried when -IncludeAuthentication is used.
  • 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. Default virtual directory queries use -AdPropertiesOnly for faster collection. When -IncludeAuthentication is used, the script queries the IIS-backed authentication settings as well.

Alternate Service Account (ASA)

The Client Access Service output also shows the Alternate Service Account configuration. This makes an existing ASA easier to notice when reviewing Kerberos-enabled Exchange environments before a migration or server replacement.

If no ASA credential is configured, the script displays Not Configured. The ASA status is informational and does not by itself confirm that Kerberos authentication is currently being used.

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 Service

The switch only changes how the results are displayed; the queried settings remain the same.

By default, output is server-based. Use -GroupByService when you want to compare the same service configuration across multiple Exchange servers.

PowerShell
# Default server-based output
.\GetExchangeURLs-v2.ps1 -Server EX601,EX602

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

# Filter services, group by service, and include authentication
.\GetExchangeURLs-v2.ps1 -Server EX601 -Service MAPI,EWS -GroupByService -IncludeAuthentication
GetExchangeURLs-v2 PowerShell script grouping Exchange Server configuration by service with the GroupByService switch

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 -GroupByService -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, service grouping, automatic server discovery, ASA visibility, and text-file output are available through optional parameters and the default Client Access Service output.

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.