Applies to: Exchange Server 2013

Topic Last Modified: 2012-09-17

Use the Test-FederationTrust cmdlet to verify that the federation trust is properly configured and functioning as expected.

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

Syntax

Test-FederationTrust [-Confirm [<SwitchParameter>]] [-DomainController <Fqdn>] [-MonitoringContext <$true | $false>] [-UserIdentity <RecipientIdParameter>] [-WhatIf [<SwitchParameter>]]

Examples

EXAMPLE 1

This example validates the federation trust deployed in the Exchange organization and checks whether a security token can be retrieved from the Microsoft Federation Gateway.

Copy Code
Test-FederationTrust

Detailed Description

You can run the Test-FederationTrust cmdlet from the Exchange Management Shell, or a monitoring system can run the test periodically.

The Test-FederationTrust cmdlet runs the following series of tests to ensure that federation is working as expected:

  • A connection to the Microsoft Federation Gateway is established. This test ensures that communication between the local Exchange server and the Microsoft Federation Gateway is working correctly.

  • Certificates are checked to ensure they're valid and can be used with the Microsoft Federation Gateway.

  • A security token is requested from the Microsoft Federation Gateway. This test ensures that a token can be properly retrieved and used.

You must run the Test-FederationTrust cmdlet from either an Exchange Mailbox or Client Access server.

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 "Federation trusts" entry in the Exchange and Shell Infrastructure Permissions topic.

Parameters

Parameter Required Type Description

Confirm

Optional

System.Management.Automation.SwitchParameter

The Confirm switch 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 switch.

DomainController

Optional

Microsoft.Exchange.Data.Fqdn

The DomainController parameter specifies the fully qualified domain name (FQDN) of the domain controller that retrieves data from Active Directory.

MonitoringContext

Optional

System.Boolean

The MonitoringContext parameter includes or excludes the associated monitoring events and performance counters in the results. Valid input for this parameter is $true or $false. The default value is $false. If you specify the value $true, the monitoring events and performance counters are included in the command results. Typically, you include the monitoring events and performance counters in the results when the output is passed to Microsoft System Center Operations Manager 2007 or System Center 2012 - Operations Manager.

UserIdentity

Optional

Microsoft.Exchange.Configuration.Tasks.RecipientIdParameter

The UserIdentity parameter specifies a mailbox user to request a token for. If a mailbox user isn't specified, the command uses the default test mailbox.

If the default test mailbox isn't present, the test fails. You can create the default test mailbox using the New-TestCasConnectivityUser.ps1 script found in the Scripts folder of the Exchange installation. The test mailbox only needs to be created once.

WhatIf

Optional

System.Management.Automation.SwitchParameter

The WhatIf switch instructs the command to simulate the actions that it would take on the object. By using the WhatIf switch, you can view what changes would occur without having to apply any of those changes. You don't have to specify a value with the WhatIf switch.

Input Types

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.

Return Types

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.