TechNet
Export (0) Print
Expand All
Collapse the table of content
Expand the table of content
Expand Minimize

Test-WebServicesConnectivity

 

Applies to: Exchange Server 2016

This cmdlet is available only in on-premises Exchange Server 2016.

Use the Test-WebServicesConnectivity cmdlet to test client connectivity to Exchange Web Services virtual directories.

For information about the parameter sets in the Syntax section below, see Exchange cmdlet syntax.

Test-WebServicesConnectivity -MonitoringContext <SwitchParameter> <COMMON PARAMETERS>
Test-WebServicesConnectivity [-ClientAccessServer <ClientAccessServerIdParameter>] <COMMON PARAMETERS>
Test-WebServicesConnectivity -AutoDiscoverServer <ClientAccessServerIdParameter> <COMMON PARAMETERS>
COMMON PARAMETERS: [-Confirm [<SwitchParameter>]] [-Identity <MailboxIdParameter>] [-LightMode <SwitchParameter>] [-MailboxCredential <PSCredential>] [-TrustAnySSLCertificate <SwitchParameter>] [-WhatIf [<SwitchParameter>]]

This example tests the client connection to Exchange Web Services on the server named MBX01.

Test-WebServicesConnectivity -ClientAccessServer MBX01

The Test-WebServicesConnectivity cmdlet tests Exchange Web Services connectivity by connecting to a specified Exchange Web Services virtual directory, to any Exchange Web Services virtual directories on a specified Exchange server, or to any Exchange Web Services virtual directories that are available in the local Active Directory site.

The first time you use this cmdlet, you might be required to create a test user. To create a test user, run the following command.

& $env:ExchangeInstallPath\Scripts\New-TestCasConnectivityUser.ps1

The test results are displayed on-screen. The cmdlet returns the following information.

  • Source   Source server.

  • ServiceEndpoint   Destination server.

  • Scenario   The operations that are tested. Values are Autodiscover: SOAP Provider and EWS: GetFolder (full mode) or EWS: ConvertID (light mode).

  • Result   The values returned are typically Success or *FAILURE*.

  • Latency(MS)   The time required to complete the test in milliseconds

You can write the results to a file by piping the output to ConvertTo-Html or ConvertTo-Csv and adding > <filename> to the command. For example:

Test-WebServicesConnectivity -ClientAccessServer MBX01 | ConvertTo-Html > "C:\My Documents\EWS Test.html"

You need to be assigned permissions before you can run this cmdlet. Although all parameters for this cmdlet are listed in this topic, you may not have access to some parameters if they're not included in the permissions assigned to you. To see what permissions you need, see the "Test Exchange Web Services" entry in the Clients and mobile devices permissions topic.

 

Parameter Required Type Description

AutoDiscoverServer

Required

Microsoft.Exchange.Configuration.Tasks.ClientAccessServerIdParameter

The AutoDiscoverServer parameter specifies the server with the Client Access server role installed that's used for Autodiscover.

You can use any value that uniquely identifies the server. For example:

  • Name

    Example: Exchange01

  • Distinguished name (DN)

    Example: CN=Exchange01,CN=Servers,CN=Exchange Administrative Group (FYDIBOHF23SPDLT),CN=Administrative Groups,CN=First Organization,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=contoso,DC=com

  • Exchange Legacy DN

    Example: /o=First Organization/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Configuration/cn=Servers/cn=Exchange01

  • GUID

    Example: bc014a0d-1509-4ecc-b569-f077eec54942

You can't use this parameter with the ClientAccessServer parameter.

MonitoringContext

Required

System.Management.Automation.SwitchParameter

The MonitoringContext switch includes the associated monitoring events and performance counters in the results. Typically, you include the monitoring events and performance counters in the results when the output is passed to MicrosoftSystem Center Operations Manager (SCOM). You don't need to specify a value with this switch.

ClientAccessServer

Optional

Microsoft.Exchange.Configuration.Tasks.ClientAccessServerIdParameter

The ClientAccessServer parameter specifies the Exchange server to test. This server has the Client Access server role installed, and is responsible for accepting client connections.

You can use any value that uniquely identifies the server. For example:

  • Name

  • Distinguished name (DN)

  • ExchangeLegacyDN

  • GUID

You can't use this parameter with the AutoDiscoverServer parameter.

Confirm

Optional

System.Management.Automation.SwitchParameter

The Confirm switch specifies whether to show or hide the confirmation prompt. How this switch affects the cmdlet depends on if the cmdlet requires confirmation before proceeding.

  • Destructive cmdlets (for example, Remove-* cmdlets) have a built-in pause that forces you to acknowledge the command before proceeding. For these cmdlets, you can skip the confirmation prompt by using this exact syntax: -Confirm:$false.

  • Most other cmdlets (for example, New-* and Set-* cmdlets) don't have a built-in pause. For these cmdlets, specifying the Confirm switch without a value introduces a pause that forces you acknowledge the command before proceeding.

Identity

Optional

Microsoft.Exchange.Configuration.Tasks.MailboxIdParameter

The Identity parameter specifies the mailbox to use for the test. You can use any value that uniquely identifies the mailbox.

For example:

  • Name

  • Display name

  • Alias

  • Distinguished name (DN)

  • Canonical DN

  • <domain name>\<account name>

  • Email address

  • GUID

  • LegacyExchangeDN

  • SamAccountName

  • User ID or user principal name (UPN)

When you use this parameter, you also need to use the MailboxCredential parameter.

LightMode

Optional

System.Management.Automation.SwitchParameter

The LightMode switch tells the command to perform only a subset of the tests. You don't need to specify a value with this switch.

When you use this switch, the EWS: ConvertId test is run instead of the EWS: GetFolder test.

MailboxCredential

Optional

System.Management.Automation.PSCredential

The MailboxCredential parameter specifies the mailbox credential to use for a single mailbox test.

This parameter requires you to create a credentials object by using the Get-Credential cmdlet. For more information, see Get-Credential.

This parameter is required when you use the Identity parameter.

TrustAnySSLCertificate

Optional

System.Management.Automation.SwitchParameter

The TrustAnySSLCertificate switch specifies whether to ignore Secure Sockets Layer (SSL) certificate validation failures. You don't need to specify a value with this switch.

This switch is useful for testing internal URLs, because a URL that has an associated certificate is typically an external URL. This switch lets the task check an internal URL without generating an error when the certificate doesn't match the URL.

WhatIf

Optional

System.Management.Automation.SwitchParameter

The WhatIf switch simulates the actions of the command. You can use this switch to view the changes that would occur without actually applying those changes. You don't need to specify a value with this switch.

To see the input types that this cmdlet accepts, see Cmdlet Input and Output Types. If the Input Type field for a cmdlet is blank, the cmdlet doesn’t accept input data.

To see the return types, which are also known as output types, that this cmdlet accepts, see Cmdlet Input and Output Types. If the Output Type field is blank, the cmdlet doesn’t return data.

 
Show:
© 2016 Microsoft