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 Get-ExchangeURLs-v2.ps1.

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 the Script

View Get-ExchangeURLs-v2.ps1

The script opens directly in the browser so the contents can be reviewed before saving or running it.

Get Exchange Server URLs

The basic usage is:

.\Get-ExchangeURLs-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.

Get-ExchangeURLs-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:

.\Get-ExchangeURLs-v2.ps1 -Server EX601 -IncludeAuthentication
Get-ExchangeURLs-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:

.\Get-ExchangeURLs-v2.ps1 -Server EX601 -Service MAPI,EWS

Authentication information can be included at the same time:

.\Get-ExchangeURLs-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.

For example, in an environment with EX601 and EX602:

.\Get-ExchangeURLs-v2.ps1 -Server EX601,EX602

the output shows the selected Client Access components for EX601 first, followed by EX602.

When the same service needs to be compared across multiple Exchange servers, the output can instead be grouped by service:

.\Get-ExchangeURLs-v2.ps1 -Server EX601,EX602 -GroupBy Service

Service filtering, grouping, and authentication reporting can also be combined:

.\Get-ExchangeURLs-v2.ps1 -Server EX601 -Service MAPI,EWS -GroupBy Service -IncludeAuthentication
Get-ExchangeURLs-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.

Running the script without specifying a server:

.\Get-ExchangeURLs-v2.ps1

automatically discovers the Exchange Mailbox servers in the organization and queries them.

Specific servers can still be supplied when required:

.\Get-ExchangeURLs-v2.ps1 -Server EX601,EX602

Save the Output to a File

The formatted output can optionally be written to a text file:

.\Get-ExchangeURLs-v2.ps1 -Server EX601 -OutputFile C:\Temp\ExchangeURLs.txt

The parameters can also be combined:

.\Get-ExchangeURLs-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

Get-ExchangeURLs-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

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.