Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Topic Last Modified: 2014-11-03
Verification schedule |
Daily |
Testing tool |
Windows PowerShell |
Permissions required |
When run locally using the Lync Server Management Shell, users must be members of the RTCUniversalServerAdmins security group. When run using a remote instance of Windows PowerShell, users must be assigned an RBAC role that has permission to run the Test-CsPersistentChatMessage cmdlet. To see a list of all RBAC roles that can use this cmdlet, run the following command from the Windows PowerShell prompt:
|
Description
The Test-CsPersistentChatMessage cmdlet verifies that a pair of test users can exchange messages using the Persistent Chat service. To do this, the cmdlet logs the two users on to Lync Server 2013, connects the users to a persistent Chat room, exchanges a pair of messages, then exits the chat room and logs off the two users. Note that calls to this cmdlet will fail if you have not created any chat rooms or if the two test user accounts are not assigned a Persistent Chat policy that gives them access to the Persistent Chat service.
Running the test
The commands shown in the following example test the ability of a pair of users (litwareinc\pilar and litwareinc\kenmyer) to log on to Lync Server 2013 and then exchange messages using the Persistent Chat service. To do this, the first command in the example uses the Get-Credential cmdlet to create a Windows PowerShell command-line interface credential object that contains the name and password of the user Pilar Ackerman. (Because the logon name, litwareinc\pilar, was included as a parameter, the Windows PowerShell Credential Request dialog box only requires the administrator to enter the password for the Pilar Ackerman account.) The resulting credentials object is then stored in a variable named $cred1. The second command does the same thing, this time returning a credential object for the Ken Myer account.
With the credential objects in hand, the third command determines whether these two users can log on to Lync Server 2013 and exchange messages using Persistent Chat. To perform this task, the Test-CsPersistentChatMessage cmdlet is called using the following parameters: TargetFqdn (the FQDN of the Registrar pool); SenderSipAddress (the SIP address for the first test user); SenderCredential (the Windows PowerShell object that contains the credentials for this same user); ReceiverSipAddress (the SIP address for the other test user); and ReceiverCredential (the Windows PowerShell object that contains the credentials for the other test user).
$cred1 = Get-Credential "litwareinc\pilar"
$cred2 = Get-Credential "litwareinc\kenmyer"
Test-CsPersistentChatMessage -TargetFqdn atl-persistentchat-001.litwareinc.com -SenderSipAddress "sip:pilar@litwareinc.com" -SenderCredential $cred1 -ReceiverSipAddress "sip:kenmyer@litwareinc.com" -ReceiverCredential $cred2
Determining success or failure
If the specified user has a valid location policy, then you'll receive output similar to this, with the Result property marked as Success:
Target Fqdn : atl-cs-001.litwareinc.com
Result : Success
Latency : 00:00:00
Error Message :
Diagnosis :
If the specified users can't exchange messages using the Persistent Chat service, the Result will be shown as Failure, and additional information will be recorded in the Error and Diagnosis properties:
WARNING: Failed to read Registrar port number for the given fully qualified
domain name (FQDN). Using default Registrar port number. Exception:
System.InvalidOperationException: No matching cluster found in topology.
at
Microsoft.Rtc.Management.SyntheticTransactions.SipSyntheticTransaction.TryRetri
eveRegistrarPortFromTopology(Int32& registrarPortNumber)
Target Fqdn : atl-cs-001.litwareinc.com
Result : Failure
Latency : 00:00:00
Error Message : 10060, A connection attempt failed because the connected party
did not properly respond after a period of time, or
established connection failed because connected host has
failed to respond [2001:4898:e8:f39e:5c9a:ad83:81b3:9944]:5061
Inner Exception:A connection attempt failed because the
connected party did not properly respond after a period of
time, or established connection failed because connected host
has failed to respond
[2001:4898:e8:f39e:5c9a:ad83:81b3:9944]:5061
Diagnosis :
Reasons why the test might have failed
Here are some common reasons why Test-CsPersistentChatMessage might fail:
An incorrect parameter value was supplied. The required test accounts may not exist or have been correctly created.
There may have been a network issue causing an unexpected delay which timed out the test.