Applies to: Exchange Server 2007
Topic Last Modified: 2007-06-11

Use the Test-OwaConnectivity cmdlet to verify that Microsoft Office Outlook Web Access is running as expected. The Test-OwaConnectivity cmdlet can be used to test Outlook Web Access connectivity for all Microsoft Exchange 2007 virtual directories on a specified Client Access server for all mailboxes on Exchange 2007 servers that are in the same Active Directory site. Test-OwaConnectivity can also be used to test the connectivity for an individual Exchange 2007 Outlook Web Access URL.

Syntax

Test-OwaConnectivity [-ClientAccessServer <ServerIdParameter>] [-AllowUnsecureAccess <SwitchParameter>] [-DomainController <Fqdn>] [-MailboxServer <ServerIdParameter>] [-MonitoringContext <SwitchParameter>] [-ResetTestAccountCredentials <SwitchParameter>] [-TestType <Internal | External>] [-TrustAnySSLCertificate <SwitchParameter>] [-VirtualDirectoryName <String>]
Test-OwaConnectivity [-URL <String>] [-AllowUnsecureAccess <SwitchParameter>] [-DomainController <Fqdn>] [-MailboxCredential <PSCredential>] [-ResetTestAccountCredentials <SwitchParameter>] [-TrustAnySSLCertificate <SwitchParameter>]

Parameters

Parameter Required Type Description

AllowUnsecureAccess

Optional

System.Management.Automation.SwitchParameter

If it is included, this parameter enables virtual directories that do not require SSL to be tested. If this parameter is not included, the task will skip virtual directories that do not require SSL and an error will be generated.

ClientAccessServer

Optional

Microsoft.Exchange.Configuration.Tasks.ServerIdParameter

This parameter specifies the name of the Client Access server to test. If this parameter is included, all Exchange 2007 Outlook Web Access virtual directories on the Client Access server will be tested against all Exchange 2007 Mailbox servers in the local Active Directory site. Microsoft Exchange 2000 Server and Microsoft Exchange Server 2003 virtual directories will not be tested. Mailboxes that are not on Exchange 2007 Mailbox servers will not be tested. Do not use this parameter with the URL parameter.

DomainController

Optional

Microsoft.Exchange.Data.Fqdn

To specify the fully qualified domain name (FQDN) of the domain controller that retrieves data from the Active Directory directory service, include the DomainController parameter in the cmdlet.

MailboxCredential

Optional

System.Management.Automation.PSCredential

This parameter includes the mailbox credential for a single URL test.

MailboxServer

Optional

Microsoft.Exchange.Configuration.Tasks.ServerIdParameter

This parameter specifies the name of the Mailbox server to test. If not specified, all Mailbox servers in the local Active Directory site will be tested.

MonitoringContext

Optional

System.Management.Automation.SwitchParameter

If this parameter is included, the task will be run by MOM scheduling. Running the task with this parameter without MOM will cause the task to fail. If this parameter is excluded, the task must be run interactively by an administrator.

ResetTestAccountCredentials

Optional

System.Management.Automation.SwitchParameter

This parameter resets the password for the test account that is used to run this cmdlet. The password for the test account is usually reset every 7 days. Use this parameter to force a password reset any time that a password reset is required for security reasons.

TestType

Optional

Microsoft.Exchange.Monitoring.OwaConnectivityTestType

This parameter determines whether the cmdlet will test internal or external URLs. Values are Internal and External. This parameter cannot be used with the URL parameter. When neither the TestType parameter nor the URL parameter is specified, the default is TestType:Internal.

TrustAnySSLCertificate

Optional

System.Management.Automation.SwitchParameter

If this parameter is used, SSL certificate validation failures will not be reported. This is useful for testing internal URLs because Internet Information Services (IIS) does not support assigning multiple certificates for a single virtual directory. If a directory has different URLs for internal and external access and has a certificate, that certificate will usually be for the external URL. This parameter lets the task check an internal URL without generating an error when the certificate does not match the URL.

URL

Optional

System.String

This parameter specifies the Outlook Web Access URL to test. If this parameter is used, only the specified URL will be tested. Do not use the URL parameter with the ClientAccessServer parameter. The URL parameter cannot be used with the TestType parameter.

VirtualDirectoryName

Optional

System.String

This parameter specifies the name of the virtual directory to test on a particular Client Access server. If this parameter is not included, all Outlook Web Access virtual directories that support Exchange 2007 mailboxes will be tested.

Detailed Description

The Test-OwaConnectivity cmdlet can be used to test the connectivity of all Exchange 2007 Outlook Web Access virtual directories on a Client Access server or to test connectivity of a single Exchange 2007 Outlook Web Access URL.

To test all Exchange 2007 Outlook Web Access virtual directories on a Client Access server, there must be a test Active Directory account. There must also be a test mailbox on each Exchange 2007 server that has the Mailbox server role installed that can be accessed through the virtual directories that are being tested. You can create the test accounts and test mailboxes during a step in the Mailbox server setup. If the test environment was not created during the Mailbox server setup, you will be prompted to run the script that creates the test mailboxes and test users when you run the Test-OwaConnectivity cmdlet.

If the server that is hosting the test mailbox is not available, the Test-OWAConnectivity cmdlet will return an error that might not clearly identify the problem. To avoid this, check that the server that hosts the test mailbox is running and that the mailbox is available before you run the Test-OWAConnectivity cmdlet.

If you run the Test-OwaConnectivity cmdlet on a Client Access server without using either the ClientAccessServer parameter or the URL parameter, the cmdlet will test the server on which you run the cmdlet. To test a specific Client Access server, use the ClientAccessServer parameter.

To run the Test-OwaConnectivity cmdlet to test Outlook Web Access connectivity for all Exchange 2007 virtual directories on a Client Access server, the account you use must be delegated the Exchange Server Administrator role and membership in the local Administrators group for the target server.

For more information about permissions, delegating roles, and the rights that are required to administer Exchange Server 2007, see Permission Considerations.

To test a single URL, run Test-OwaConnectivity with the URL parameter and credentials for an existing Exchange 2007 mailbox. If the URL is behind a load balancer, you cannot predict which Client Access server the cmdlet will test. Because credentials are required as part of the parameters when you use the URL parameter, you can use any account to run Test-OwaConnectivity when you use the URL parameter.

If the cmdlet encounters a virtual directory that does not require Secure Sockets Layer (SSL), it will skip that directory unless the AllowUnsecureAccess parameter is used. If the AllowUnsecureAccess parameter is used, communications between servers will be sent in clear text for purposes of the test.

The Test-OwaConnectivity cmdlet can be run as a one-time interactive task or as a scheduled task under Microsoft Operations Manager (MOM) control. To run Test-OwaConnectivity as a MOM task, the Client Access test environment must be available on the Mailbox servers that the cmdlet will test against.

Input Types

Return Types

Errors

Error Description

 

 

Exceptions

Exceptions Description

 

 

Example

The first code example tests the connectivity for the URL https://mail.contoso.com/owa by using the credentials for the user contoso\kweku.

The second code example tests the connectivity of a specific Client Access server named Contoso12 and will test all Outlook Web Access virtual directories that support Exchange 2007 mailboxes. These include the virtual directories that do not require SSL.

Copy Code
Test-OwaConnectivity -URL:https://mail.contoso.com/owa -MailboxCredential:(get-credential contoso\kweku)
Test-OwaConnectivity -ClientAccessServer:Contoso12 -AllowUnsecureAccess