Commands › Exchange Online

Test-WebServicesConnectivity

Exchange Online ExchangeOnlineManagement Test-*

Test client connectivity to Exchange Web Services virtual directories. **Note**: This cmdlet works best in Exchange 2010. In later versions of Exchange, the functionality of this cmdlet is replaced by Managed Availability. For the best results, use the Invoke-MonitoringProbe cmdlet and specify the relevant active monitor probe instead of using this cmdlet.

Quick start script

# Test-WebServicesConnectivity — quick start (serv365.ai)
# 1. Connect (app-only shown; interactive: omit the certificate parameters)
Connect-ExchangeOnline -CertificateThumbprint $thumb -AppId $appId -Organization $org

# 2. Run and inspect
Test-WebServicesConnectivity -AutoDiscoverServer <ClientAccessServerIdParameter> -MonitoringContext <SwitchParameter> | Format-List

# 3. Export for evidence / drift tracking
Test-WebServicesConnectivity | Export-Clixml .\WebServicesConnectivity-$(Get-Date -Format yyyyMMdd).xml

Syntax — 4 parameter sets

Default

Test-WebServicesConnectivity [[-ClientAccessServer] <ServerIdParameter>]
 [-AllowUnsecureAccess]
 [-Confirm]
 [-DomainController <Fqdn>]
 [-LightMode]
 [-MailboxCredential <PSCredential>]
 [-MailboxServer <ServerIdParameter>]
 [-ResetTestAccountCredentials]
 [-Timeout <UInt32>]
 [-TrustAnySSLCertificate]
 [-UseAutodiscoverForClientAccessServer]
 [-WhatIf]
 [<CommonParameters>]

AutoDiscoverServer

Test-WebServicesConnectivity [[-Identity] <MailboxIdParameter>] -AutoDiscoverServer <ClientAccessServerIdParameter>
 [-Confirm]
 [-LightMode]
 [-MailboxCredential <PSCredential>]
 [-TrustAnySSLCertificate]
 [-WhatIf]
 [<CommonParameters>]

MonitoringContext

Test-WebServicesConnectivity [[-Identity] <MailboxIdParameter>] [-MonitoringContext]
 [-Confirm]
 [-LightMode]
 [-MailboxCredential <PSCredential>]
 [-TrustAnySSLCertificate]
 [-WhatIf]
 [<CommonParameters>]

ClientAccessServer

Test-WebServicesConnectivity [[-Identity] <MailboxIdParameter>] [-ClientAccessServer <ClientAccessServerIdParameter>]
 [-Confirm]
 [-LightMode]
 [-MailboxCredential <PSCredential>]
 [-TrustAnySSLCertificate]
 [-WhatIf]
 [<CommonParameters>]

Parameters (15)

ParameterTypeRequiredWhat it controls
-Identity MailboxIdParameter The Identity parameter specifies the mailbox to use for the test. You can use any value that uniquely identifies the mailbox. For example:
-ClientAccessServer ServerIdParameter 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.
-AutoDiscoverServer ClientAccessServerIdParameter yes The AutoDiscoverServer parameter specifies the server with the Client Access server role installed that's used for Autodiscover.
-AllowUnsecureAccess SwitchParameter The AllowUnsecureAccess switch specifies whether to enable the command to continue to run over an unsecured channel that doesn't require Transport Layer Security (TLS). You don't need to specify a value with this switch.
-Confirm SwitchParameter The Confirm switch specifies whether to show or hide the confirmation prompt. How this switch affects the cmdlet depends on whether the cmdlet requires confirmation before proceeding.
-DomainController Fqdn The DomainController parameter specifies the domain controller that's used by this cmdlet to read data from or write data to Active Directory. You identify the domain controller by its fully qualified domain name...
-LightMode 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.
-MailboxCredential PSCredential The MailboxCredential parameter specifies the mailbox credential to use for a single mailbox test.
-MailboxServer ServerIdParameter The MailboxServer parameter specifies the identity of the Exchange Mailbox server on which the test is run.
-MonitoringContext SwitchParameter yes The MonitoringContext switch includes the associated monitoring events and performance counters in the results. You don't need to specify a value with this switch.
-ResetTestAccountCredentials SwitchParameter The ResetTestAccountCredentials switch resets the password for the test account that's used to run this command. You don't need to specify a value with this switch.
-Timeout UInt32 The Timeout parameter specifies the amount of time, in seconds, to wait for the test operation to finish. The default value for the Timeout parameter is 300 seconds. You must specify a time-out value greater than 0...
-TrustAnySSLCertificate SwitchParameter The TrustAnySSLCertificate switch allows Exchange to accept certificates from untrusted certification authorities (CAs). You don't need to specify a value with this switch.
-UseAutodiscoverForClientAccessServer SwitchParameter The UseAutodiscoverForClientAccessServer switch specifies whether the test should use the Autodiscover service to locate the Client Access server. You don't need to specify a value with this switch.
-WhatIf SwitchParameter The WhatIf switch shows what the command does without making any changes. You don't need to specify a value with this switch.

Reference facts derived from Microsoft documentation, © Microsoft, licensed CC BY 4.0; restructured with original guidance by serv365.ai.