Topic Last Modified: 2010-10-01

Tests the ability of a user to employ group expansion. Microsoft Lync Server 2010 enables users to configure an Active Directory distribution group as a contact. When you "expand" a group you will see the name and presence information for each member of the group.


Test-CsGroupExpansion -TargetFqdn <String> -GroupEmailAddress <String> [-External <SwitchParameter>] [-Force <SwitchParameter>] [-OutVerboseVariable <String>] [-RegistrarPort <Nullable>] [-UserSipAddress <String>]
Test-CsGroupExpansion -GroupEmailAddress <String> -TargetUri <String> -UserSipAddress <String> [-Force <SwitchParameter>] [-OutVerboseVariable <String>] [-WebCredential <PSCredential>]
Test-CsGroupExpansion [-TargetFqdn <String>] -GroupEmailAddress <String> -UserCredential <PSCredential> -UserSipAddress <String> [-External <SwitchParameter>] [-Force <SwitchParameter>] [-OutVerboseVariable <String>] [-RegistrarPort <Nullable>]


Parameter Required Type Description




Email address of the targeted distribution group. For example: -GroupEmailAddress "".



Switch Parameter

Enables you to verify that external users can use group expansion.




SIP port used by the Registrar service. This parameter is not required if the Registrar uses the default port 5061.




Fully qualified domain name (FQDN) of the Registrar pool where group expansion is to be tested. For example: -TargetFqdn "".

Note that you cannot use both the TargetUri parameter and the TargetFqdn parameter in the same command.




Uniform Resource Identifier (URI) of the Group Expansion Web service. For example: -TargetUri "".

Note that you cannot use both the TargetUri parameter and the TargetFqdn parameter in the same command.



PS credential object

User credential object for the user account to be used in the test. The value passed to UserCredential should be an object reference obtained by using the Get-Credential cmdlet. For example, this code returns a credentials object for the user litwareinc\kenmyer and stores that object in a variable named $x:

$x = Get-Credential "litwareinc\kenmyer"

You will need to supply the user password when running this command.

The user credential is not required if you are running the test under the credentials of the logged-on user and using the TargetFqdn parameter. The user credential is required if you are using the TargetUri parameter.




SIP address of the user to be used in the test. If this parameter is not specified, then Test-CsGroupExpansion will conduct its checks using the account of the logged-on user.



Switch Parameter

Suppresses the display of any non-fatal error message that might occur when running the command.




Reports detailed activity to the screen as the cmdlet runs.

Detailed Description

Users sometimes need to communicate on a regular basis with all the members of an Active Directory distribution group; for example, that group might comprise all the members of a team or all the people assigned to a particular project. In recognition of this, Lync Server 2010 allows you to configure a distribution group as a contact. If you do this, you can then send the same instant message to all the group members simply by addressing the message to the group rather than each individual member of that group.

There might also be times when you need to communicate with (or check the presence of) certain individuals in the group. Group expansion enables you to quickly and easily view all the group members and their current status. In addition to that, you can also select one or more group members, and then send an instant message just to those users rather than to all the members of the group.

Group expansion is enabled and disabled by using the Set-CsWebServiceConfiguration cmdlet. If group expansion is enabled, you can determine whether the feature is working by running the Test-CsGroupExpansion cmdlet. With this cmdlet, you specify an Active Directory distribution group by using the group’s email address. Test-CsGroupExpansion then uses group expansion to retrieve the group membership and compare the retrieved list with the membership of the group email address that you supplied. If the two lists match, then group expansion is working correctly.

Note that you can test group expansion in two different ways: by testing the service itself or by testing the associated web service.

Who can run this cmdlet: To return a list of all the role-based access control (RBAC) roles this cmdlet has been assigned to (including any custom RBAC roles you have created yourself), run the following command from the Windows PowerShell prompt:

Get-CsAdminRole | Where-Object {$_.Cmdlets –match "Test-CsGroupExpansion"}

Input Types

None. Test-CsGroupExpansion does not accept pipelined input.

Return Types

Test-CsGroupExpansion returns an instance of the Microsoft.Rtc.SyntheticTransactions.TaskOutput object.


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

Copy Code
Test-CsGroupExpansion -TargetFqdn -GroupEmailAddress 

The command shown in Example 1 connects to the Registrar pool in order to verify group expansion. To run the test, the command uses the group

See Also