Testing the replica service in Lync Server 2013


Letztes Änderungsdatum des Themas: 2015-03-09

Verification schedule


Testing tool

Windows PowerShell

Permissions required

When run locally using the Lync Server-Verwaltungsshell, 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-CsReplica cmdlet. To see a list of all RBAC roles that can use this cmdlet, run the following command from the Windows PowerShell prompt:

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


The Test-CsReplica cmdlet verifies that the Lync Server 2013 replica service is running on the local computer. The Test-CsReplica cmdlet performs such tasks as:

  • checking the status of the Replicator Agent and Centralized Logging Agent services

  • verifying that the required ports were opened in the Windows Firewall

  • making sure that the necessary Active Directory and local computer security groups exist.

Note that this cmdlet must be run locally. That is, it must be run on the same computer where the replica service is running. There are no options for running the Test-CsReplica cmdlet against a remote server.

Running the test

The command shown in Example 1 tests the Lync Server 2013 replica service on the local computer. In this example the Verbose parameter is used to guarantee that information about the test – including the eventual failure or success of the test and the location of the report generated by the test – is displayed on screen.

Test-CsReplica -Verbose

Example 2 is a variation of the command shown in Example 1. In this case, the Report parameter is included to specify a folder path and name for the report generated by the test. If you do not specify a report path the report will be given an auto-generated name similar to this:


Test-CsReplica -Verbose -Report C:\Logs\ReplicaTest.html

Determining success or failure

Insert section body here.

VERBOSE: Creating new log file "C:\Users\Testing\AppData\Local\Temp\Test-CsReplica-3cb066b3-dd23-411a-8932-99f01c0f940c.xml".

VERBOSE: Creating new log file "C:\Users\Testing\AppData\Local\Temp\Test-CsReplica-3cb066b3-dd23-411a-8932-99f01c0f940c.xml".

VERBOSE: "Test-CsReplica" processing has completed successfully.

VERBOSE: Detailed results can be found at "C:\Users\Testing\AppData\Local\Temp\Test-CsReplica-3cb066b3-dd23-411a-8932-99f01c0f940c.xml".

VERBOSE: Creating new log file



VERBOSE: Creating new log file



WARNING: Test-CsReplica failed.

WARNING: Detailed results can be found at



Test-CsReplica : Command execution failed: Requested registry access is not


At line:1 char:1

+ Test-CsReplica -Verbose

+ ~~~~~~~~~~~~~~~~~~~~~~~

+ CategoryInfo : InvalidOperation: (:) [Test-CsReplica], Security


+ FullyQualifiedErrorId : ProcessingFailed,Microsoft.Rtc.Management.Deploy


PS C:\Users\Testing>

PS C:\Users\Testing> Test-CsUcwaConference -TargetFqdn "LyncTest.SelfHost.Corp.M


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.



eveRegistrarPortFromTopology(Int32& registrarPortNumber)

Test-CsUcwaConference : There is no test user assigned for

[LyncTest.SelfHost.Corp.Microsoft.com]. Verify test user configuration.

At line:1 char:1

+ Test-CsUcwaConference -TargetFqdn "LyncTest.SelfHost.Corp.Microsoft.com"

+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+ CategoryInfo : ResourceUnavailable: (:) [Test-CsUcwaConference]

, InvalidOperationException

+ FullyQualifiedErrorId : NotFoundTestUsers,Microsoft.Rtc.Management.Synth


Reasons why the test might have failed

Here are some common reasons why Test-CsReplica might fail:

  • There may be a larger problem with the Replicator Agent and Centralized Logging Agent services

  • The required ports may not be open in the Windows Firewall

  • The necessary Active Directory and local computer security groups may not exist