[This is preliminary documentation and is subject to change. Blank topics are included as placeholders.]

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


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


Parameter Required Type Description




Fully qualified domain name of the registrar pool where group expansion is to be tested. For example: -TargetFqdn "atl-cs-001.litwareinc.com".

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




URI of the group expansion Web service. For example: -TargetUri "https://atl-cs-001.litwareinc.com/groupexpansion".

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



X509 certificate

Enables you to use an X.509 certificate for authentication purposes.




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-in user.



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.



String array

Comma-separated list of the email addresses for the members of the targeted distribution group. For example: -ExpectedMailAddresses "jhaas@litwareinc.com","packerman@litwareinc.com",kenmyer@litwareinc.com.




Email address of the targeted distribution group. For example: -GroupEmailAddress "FinanceGroup@litwareinc.com".



Switch Parameter

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




Reports detailed activity to the screen as the cmdlet runs.



Switch Parameter

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

Detailed Description

It’s not unusual for users to 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, Microsoft Communications Server 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.

Of course, there might also be times when you need to communicate with (or check the presence of) certain individuals in that group. Group expansion enables you, with a single click of the mouse, to see all the group members and their current status. If you want, you can select one or more group members and then send an instant message just to those users.

Group expansion is enabled and disabled by using the Set-CsWebServiceConfiguration cmdlet. If group expansion is enabled, you can determine whether working by running the Test-CsGroupExpansion cmdlet. With this cmdlet, you specify an Active Directory distribution group (using the group’s email address) as well as a list of the actual members of that group. Test-CsGroupExpansion will then use group expansion to retrieve the group membership and compare the retrieved list with the list 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.

Return Types

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


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

Copy Code
Test-CsGroupExpansion -TargetFqdn atl-cs-001.litwareinc.com -GroupEmailAddress FinanceGroup@litwareinc.com -ExpectedMailAddresses "jhaas@litwareinc.com","packerman@litwareinc.com","kenmyer@litwareinc.com"

The command shown in Example 1 connects to the registrar pool atl-cs-001.litwareinc.com in order to verify group expansion. To run the check, the command uses the group FinanceGroup@litwareinc.com and supplies the three user email addresses (jhaas@litwareinc.com, packerman@litwareinc.com, and kenmyer@litwareinc.com) that group expansion should return.

-------------------------- Example 2 --------------------------

Copy Code
$cred1 = Get-Credential "litwareinc\jhaas"

Test-CsGroupExpansion -TargetUri https://atl-cs-001.litwareinc.com/groupexpansion -UserCredential $cred1 -GroupEmailAddress FinanceGroup@litwareinc.com -ExpectedMailAddresses "jhaas@litwareinc.com","packerman@litwareinc.com","kenmyer@litwareinc.com"

The preceding command connects to the Web service for the registrar pool atl-cs-001.litwareinc.com in order to verify group expansion. In order to connect to the Web service, the Get-Credential command is first used to create a credential object for the user litwareinc\jhaas. This object is then stored in a variable named $cred1.

After the credential object has been created (you need to supply the password for jhaas in order to create this object) Test-CsGroupExpansion is then called. In this example, the –TargetUri parameter is specified, followed by the URI for group expansion. The –UserCredential parameter (and the credential object $cred1) are also included in the command, along with the email address of the distribution group and the list of expected group members.