Test-OwaConnectivity
Applies to: Exchange Server 2007 SP1, Exchange Server 2007 SP2, Exchange Server 2007 SP3
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>] [-Confirm [<SwitchParameter>]] [-DomainController <Fqdn>] [-LightMode <SwitchParameter>] [-MailboxServer <ServerIdParameter>] [-MonitoringContext <SwitchParameter>] [-ResetTestAccountCredentials <SwitchParameter>] [-Site <AdSiteIdParameter>] [-TestType <Internal | External>] [-Timeout <UInt32>] [-TrustAnySSLCertificate <SwitchParameter>] [-VirtualDirectoryName <String>] [-WhatIf [<SwitchParameter>]]
Test-OwaConnectivity [-URL <String>] [-AllowUnsecureAccess <SwitchParameter>] [-Confirm [<SwitchParameter>]] [-DomainController <Fqdn>] [-LightMode <SwitchParameter>] [-MailboxCredential <PSCredential>] [-ResetTestAccountCredentials <SwitchParameter>] [-Site <AdSiteIdParameter>] [-Timeout <UInt32>] [-TrustAnySSLCertificate <SwitchParameter>] [-WhatIf [<SwitchParameter>]]
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.
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. |
Confirm |
Optional |
System.Management.Automation.SwitchParameter |
The Confirm parameter causes the command to pause processing and requires you to acknowledge what the command will do before processing continues. You don't have to specify a value with the Confirm 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. |
LightMode |
Optional |
System.Management.Automation.SwitchParameter |
This parameter is not implemented for the Test-OwaConnectivity diagnostic cmdlet. Using this parameter does not change the behavior of the cmdlet. Note This cmdlet is implemented for other Exchange 2007 diagnostic cmdlets. Specifically, it is used in cases in which you want to run a less intensive version of a 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 |
The ResetTestAccountCredentials parameter resets the password for the test account used to perform this command. The password for the test account is typically reset every seven days if you're using Microsoft System Center Operations Manager to manage your Exchange environment. Use of this flag forces a password reset at any time if it's required for security reasons. |
Site |
Optional |
Microsoft.Exchange.Configuration.Tasks.AdSiteIdParameter |
The Site parameter is used to specify the Active Directory site. |
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 together with the URL parameter. When neither the TestType parameter nor the URL parameter is specified, the default is TestType:Internal. |
Timeout |
Optional |
System.UInt32 |
This parameter specifies the amount of time to wait for the test operation to finish (in seconds). The default value for Timeout is 30 seconds. You must specify a Timeout value greater than 0 seconds and less than 1 hour (3600 seconds). We recommend that you always configure this parameter with a value of 5 seconds or more. |
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. |
WhatIf |
Optional |
System.Management.Automation.SwitchParameter |
The WhatIf parameter instructs the command to simulate the actions that it would take on the object. By using the WhatIf parameter, you can view which changes would occur without having to apply any of those changes. You don't have to specify a value for the WhatIf parameter. |
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.
Test-OwaConnectivity -URL:https://mail.contoso.com/owa -MailboxCredential:(get-credential contoso\kweku)
Test-OwaConnectivity -ClientAccessServer:Contoso12 -AllowUnsecureAccess