Applies to: Exchange Server 2010 SP3, Exchange Server 2010 SP2

Topic Last Modified: 2012-11-19

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


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

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 Server 2010 Hub Transport 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.


Parameter Required Type Description




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.




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




The MonitoringContext parameter specifies whether additional troubleshooting information should be returned. The additional information returned by the monitoring context is used by Microsoft System Center Operations Manager 2007. Valid input for this parameter is $true or $false.




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.




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.



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

Copy Code