Test-OutlookConnectivity

This cmdlet is available only in on-premises Exchange.

Use the Test-OutlookConnectivity cmdlet to test end-to-end Microsoft Outlook client connectivity in the Microsoft Exchange organization. This includes testing for both Outlook Anywhere (RPC over HTTP) and MAPI over HTTP connections.

For information about the parameter sets in the Syntax section below, see Exchange cmdlet syntax (https://technet.microsoft.com/library/bb123552.aspx).

Syntax

Test-OutlookConnectivity
    [-ProbeIdentity] <String>
    [-Credential <PSCredential>]
    [-Hostname <String>]
    [-MailboxId <MailboxIdParameter>]
    [-RunFromServerId <ServerIdParameter>]
    [-TimeOutSeconds <String>]
    [<CommonParameters>]
Test-OutlookConnectivity
    [[-Identity] <MailboxIdParameter>]
    -Protocol <HTTP | TCP | WS>
    [-Archive <$true | $false>]
    [-Confirm]
    [-MailboxCredential <PSCredential>]
    [-MonitoringContext]
    [-TotalTimeoutInMinutes <Int32>]
    [-TrustAnySslCert]
    [-WhatIf]
    [<CommonParameters>]
Test-OutlookConnectivity
    [[-Identity] <MailboxIdParameter>]
    -GetDefaultsFromAutodiscover <$true | $false>
    [-Archive <$true | $false>]
    [-Confirm]
    [-MailboxCredential <PSCredential>]
    [-RpcAuthenticationType <Negotiate | NTLM | Kerberos>]
    [-RpcClientAccessServer <ClientAccessServerIdParameter>]
    [-RpcProxyAuthenticationType <Basic | NTLM | Negotiate>]
    [-RpcProxyServer <ServerIdParameter>]
    [-TotalTimeoutInMinutes <Int32>]
    [-TrustAnySslCert]
    [-WhatIf]
    [-MonitoringContext]
    [<CommonParameters>]
Test-OutlookConnectivity
    [[-Identity] <MailboxIdParameter>]
    -RpcTestType <Array | Server>
    [-Archive <$true | $false>]
    [-Confirm]
    [-MailboxCredential <PSCredential>]
    [-MonitoringContext]
    [-RpcAuthenticationType <Negotiate | NTLM | Kerberos>]
    [-RpcClientAccessServer <ClientAccessServerIdParameter>]
    [-RpcProxyAuthenticationType <Basic | NTLM | Negotiate>]
    [-RpcProxyTestType <External | Internal>]
    [-TotalTimeoutInMinutes <Int32>]
    [-TrustAnySslCert]
    [-WhatIf]
    [<CommonParameters>]
Test-OutlookConnectivity
    [[-Identity] <MailboxIdParameter>]
    -WSTestType <Unknown | Internal | External>
    [-Archive <$true | $false>]
    [-Confirm]
    [-MailboxCredential <PSCredential>]
    [-MonitoringContext]
    [-TotalTimeoutInMinutes <Int32>]
    [-TrustAnySslCert]
    [-WhatIf]
    [<CommonParameters>]

Description

Running the Test-OutlookConnectivity cmdlet validates an Outlook connection defined by the provided parameters. The command is able to validate a single mailbox.

The Test-OutlookConnectivity cmdlet runs the same process as the monitoring probes. The Microsoft Exchange Health Manager (MSExchangeHM) service must be running and have created the Outlook probes on the machine that will be tested. You need to select one of the Outlook probe identities to run the test. Use the Get-MonitoringItemIdentity (https://go.microsoft.com/fwlink/p/?LinkId=510841) cmdlet to see what probes are active.

This example lists the probes running in the backend services on a Mailbox server.

This example lists the probes running in the client access services on a Mailbox server.

For more information on probes and the monitoring framework, see Managed Availability (https://go.microsoft.com/fwlink/p/?LinkId=510838), Managed Availability and Server Health (https://go.microsoft.com/fwlink/p/?LinkId=510839), and Customizing Managed Availability (https://go.microsoft.com/fwlink/p/?LinkId=510840)

By default, the cmdlet uses the test monitoring account attached to the specifed probe. You may enter a different mailbox instead via the MailboxId parameter. The options and results follow.

  • MailboxId and Credential are not specified: Generic connectivity test against a test mailbox using the system's test credentials.

  • MailboxId is specified, Credential is not: Connectivity test to the specific mailbox using the system's test credentials.

  • MailboxId and Credential are both specified: You get a connectivity test to the specific mailbox, and also a test that the credentials provided are valid for that mailbox

You need to be assigned permissions before you can run this cmdlet. Although this topic lists all parameters for the cmdlet, you may not have access to some parameters if they're not included in the permissions assigned to you. To find the permissions required to run any cmdlet or parameter in your organization, see Find the permissions required to run any Exchange cmdlet (https://technet.microsoft.com/library/mt432940.aspx).

Examples

-------------------------- Example 1 --------------------------

Test-OutlookConnectivity -Protocol:HTTP -GetDefaultsFromAutoDiscover:$true

In Exchange 2010, this example tests the most common end-to-end Outlook connectivity scenario for Outlook Anywhere. This includes testing for connectivity through the Autodiscover service, creating a user profile, and logging on to the user mailbox. All of the required values are retrieved from the Autodiscover service. Because the Identity parameter isn't specified, the command uses the temporary test user that you've created using the New-TestCasConnectivityUser.ps1 script. This example command can be run to test TCP/IP connectivity by setting the Protocol parameter to RPC.

-------------------------- Example 2 --------------------------

Test-OutlookConnectivity -ProbeIdentity "OutlookRpcSelfTestProbe"

In Exchange 2013 or later, this example runs an OutlookRpcSelfTestProbe on the mailbox server that you're currently connected to.

-------------------------- Example 3 --------------------------

Test-OutlookConnectivity -RpcProxyTestType:Internal -RpcTestType:Server

In Exchange 2010, this example tests for Outlook Anywhere connectivity using the local server as the RpcProxy endpoint as well as the RPC endpoint. Because the Identity parameter isn't specified, the command uses the temporary test user that you've created using the New-TestCasConnectivityUser.ps1 script. Modify this example to use the public external URL by setting the RpcProxyTestType parameter to External. Additionally, the example command can use the Client Access server array as the RPC endpoint by setting the RpcTestType parameter to Array. To only validate TCP/IP connectivity, omit the RpcProxyTestType parameter.

-------------------------- Example 4 --------------------------

Test-OutlookConnectivity "OutlookRpcDeepTestProbe\Mailbox Database 1234512345" -RunFromServerId PrimaryMailbox -MailboxId johnd@contoso.com

In Exchange 2013 or later, this example runs the OutlookRpcDeepTestProbe from the "PrimaryMailbox" server for the mailbox "johnd@contoso.com" mounted on "Mailbox Database 1234512345". Because the Credential parameter is not specified, the probe will use the default testing credentials.

-------------------------- Example 5 --------------------------

Test-OutlookConnectivity -RpcProxyServer:RpcProxySrv01 -RpcProxyAuthenticationType:Basic -RpcClientAccessServer:CAS01 -RpcAuthenticationType:NTLM

In Exchange 2010, this example validates Outlook connectivity through RpcProxy on one server to a different server running the Client Access server role with Basic for the outer authentication layer and NTLM for the inner authentication layer. Using these parameters should allow you to validate most types of Outlook connectivity configurations. This command can also be used with the GetDefaultsFromAutoDiscover parameter set to $true if you only need to override one or two parameters. This following command is similar to running a connectivity test using the RPC Ping utility but provides stronger validation.

-------------------------- Example 6 --------------------------

$TestCredentials = Get-Credential; 
Test-OutlookConnectivity -ProbeIdentity OutlookRpcCtpProbe -MailboxId johnd@contoso.com -Credential $TestCredentials

In Exchange 2013 or later, this example runs the OutlookRpcCtpProbe and verifies the log-on credentials for the "johnd@contoso.com" mailbox.

-------------------------- Example 7 --------------------------

Test-OutlookConnectivity -ProbeIdentity "OutlookRpcCTPProbe" -MailboxID johnd@contoso.com

In Exchange 2013 or later, this example runs a logon test from the client access services on a Mailbox server for the mailbox johnd@contoso.com.

Required Parameters

-GetDefaultsFromAutodiscover

This parameter is available or functional only in Exchange Server 2010.

The GetDefaultsFromAutodiscover parameter specifies whether to get default values for all of the other parameters for the command from the Autodiscover service settings. If you run the command specifying values for other parameters, those values override the default values from the Autodiscover service. The default value for this parameter is $true.

Type:$true | $false
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Exchange Server 2010
-ProbeIdentity

The ProbeIdentity parameter specifies the probe to use.

  • RPC over HTTP (Outlook Anywhere) probes

  • MAPI over HTTP probes

Type:String
Position:1
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Exchange Server 2013, Exchange Server 2016, Exchange Server 2019
-Protocol

This parameter is available or functional only in Exchange Server 2010.

The Protocol parameter specifies whether to test for Outlook Anywhere connectivity or directly test for RPC or TCP/IP connectivity. The value is either HTTP or TCP.

Type:HTTP | TCP | WS
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Exchange Server 2010
-RpcTestType

This parameter is available or functional only in Exchange Server 2010.

The RpcTestType parameter specifies which type of RPC endpoint the command should test. Valid values are Server or Array. If Server is specified, the command uses the local server as the RPC endpoint. If Array is specified, the command looks for a ClientAccessArray object in the same Active Directory site where the command is being run.

Type:Array | Server
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Exchange Server 2010
-WSTestType

This parameter is available or functional only in Exchange Server 2010.

The WSTestType parameter specifies type of servers that you want to include in your Outlook connectivity test. You can use the following values:

  • Unknown

  • Internal

  • External

  • The default value is Unknown.

Type:Unknown | Internal | External
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Exchange Server 2010

Optional Parameters

-Archive

This parameter is available or functional only in Exchange Server 2010.

The Archive parameter specifies whether tests should be performed to connect to the user's on-premises archive mailbox. You don't need to specify a value for this parameter.

Type:$true | $false
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Exchange Server 2010
-Confirm

This parameter is available or functional only in Exchange Server 2010.

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.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Exchange Server 2010
-Credential

The Credential parameter specifies the credential used by the probe. The system's test credentials are used by default. This parameter requires you to create a credentials object by using the Get-Credential cmdlet. For more information, see Get-Credential (https://go.microsoft.com/fwlink/p/?linkId=142122).

Type:PSCredential
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Exchange Server 2013, Exchange Server 2016, Exchange Server 2019
-Hostname

TheHostname parameter specifies the protocol endpoint target of the probe. You can use a specific Mailbox server or route through Distributed Name Service server.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Exchange Server 2013, Exchange Server 2016, Exchange Server 2019
-Identity

This parameter is available or functional only in Exchange Server 2010.

The Identity parameter specifies a target user mailbox. This value can be the mailbox GUID or can be the domain name\user, for example, contoso.com\erin. If the parameter isn't specified, the command looks for a test user in Active Directory. You need to create the test user with the New-TestCasConnectivityUser.ps1 script.

Type:MailboxIdParameter
Position:1
Default value:None
Accept pipeline input:True
Accept wildcard characters:False
Applies to:Exchange Server 2010
-MailboxCredential

This parameter is available or functional only in Exchange Server 2010.

The MailboxCredential parameter specifies certain credentials to allow logon access to a user's mailbox. Use the parameter along with the Identity parameter to access a user's mailbox when you don't have access permissions.

Type:PSCredential
Position:Named
Default value:None
Accept pipeline input:True
Accept wildcard characters:False
Applies to:Exchange Server 2010
-MailboxId

The MailboxID parameter specifies the target mailbox. IF not specified, this uses the test account.

Type:MailboxIdParameter
Position:Named
Default value:None
Accept pipeline input:True
Accept wildcard characters:False
Applies to:Exchange Server 2013, Exchange Server 2016, Exchange Server 2019
-MonitoringContext

This parameter is available or functional only in Exchange Server 2010.

The MonitoringContext parameter specifies whether the command returns additional information that can be used with Microsoft System Center Operations Manager 2007. The default value is $false.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Exchange Server 2010
-RpcAuthenticationType

This parameter is available or functional only in Exchange Server 2010.

The RpcAuthenticationType parameter specifies the authentication setting to test for the RPC layer. Using this parameter is helpful if a different authentication type is set at the RPC proxy virtual directory. You can use the following values:

  • NTLM

  • Kerberos

  • Negotiate

The default value is Negotiate.

Type:Negotiate | NTLM | Kerberos
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Exchange Server 2010
-RpcClientAccessServer

This parameter is available or functional only in Exchange Server 2010.

The RpcClientAccessServer parameter specifies the target server with the Client Access server role installed that you want to test. This can be a server fully qualified domain name (FQDN) or a GUID.

Type:ClientAccessServerIdParameter
Position:Named
Default value:None
Accept pipeline input:True
Accept wildcard characters:False
Applies to:Exchange Server 2010
-RpcProxyAuthenticationType

This parameter is available or functional only in Exchange Server 2010.

The RpcProxyAuthenticationType parameter specifies the authentication setting for the RPC Proxy endpoint. The value can be specified as Basic, NTLM, or Negotiate. There is no default value unless used with the GetDefaultsFromAutodiscover parameter.

Type:Basic | NTLM | Negotiate
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Exchange Server 2010
-RpcProxyServer

This parameter is available or functional only in Exchange Server 2010.

The RpcProxyServer parameter specifies whether to set the target RpcProxy server for testing. This parameter can be used when the RpcProxy server is different from the Client Access server.

Type:ServerIdParameter
Position:Named
Default value:None
Accept pipeline input:True
Accept wildcard characters:False
Applies to:Exchange Server 2010
-RpcProxyTestType

This parameter is available or functional only in Exchange Server 2010.

The RpcProxyTestType parameter specifies which HTTP endpoint the command should connect to. The value can be Internal or External. The Internal value refers to the local computer name (http://<localcomputername>, for example, http://CAS01). The External value refers to a public namespace (the external HTTP URL on the /rpc virtual directory, for example, http://mail.contoso.com).

Type:External | Internal
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Exchange Server 2010
-RunFromServerId

The RunFromServerID parameter specifies the server on which the probe should be run.

Type:ServerIdParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Exchange Server 2013, Exchange Server 2016, Exchange Server 2019
-TimeOutSeconds

The TimeOutSeconds parameter specifies the timeout period in seconds before the probe is ended. The default value is 30 seconds. The digits can be entered with or with the use of quotation marks. Either 10 or "10" will work. Any input error will default back to 30 seconds.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Exchange Server 2013, Exchange Server 2016, Exchange Server 2019
-TotalTimeoutInMinutes

This parameter is available or functional only in Exchange Server 2010.

The TotalTimeoutInMinutes parameter specifies the time limit, in minutes, for the command to wait for test results before ending the request. The default value is two minutes.

Type:Int32
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Exchange Server 2010
-TrustAnySslCert

This parameter is available or functional only in Exchange Server 2010.

The TrustAnySslCert parameter can be set to $true to ignore any Secure Sockets Layer (SSL) certificate warnings. The default value is $false.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Exchange Server 2010
-WhatIf

This parameter is available or functional only in Exchange Server 2010.

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.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Exchange Server 2010

Inputs

To see the input types that this cmdlet accepts, see Cmdlet Input and Output Types (https://go.microsoft.com/fwlink/p/?LinkId=616387). If the Input Type field for a cmdlet is blank, the cmdlet doesn't accept input data.

Outputs

To see the return types, which are also known as output types, that this cmdlet accepts, see Cmdlet Input and Output Types (https://go.microsoft.com/fwlink/p/?LinkId=616387). If the Output Type field is blank, the cmdlet doesn't return data.