5. Lync Server Management Shell
The Lync Server 2013 Management Shell
provides several cmdlets that can be used to test various functions of
a server. A useful cmdlet for verifying the overall health of a server
is Test-CSComputer
which verifies that all services are
running, that the local computer group membership is correctly
populated with the necessary Lync Server Active Mediation Server
groups, and that the required Windows Firewall ports have been opened.
The Test-CSComputer
cmdlet must be run from the local computer and it uses the following syntax:
Test-CSComputer -Report "C:\Test-CSComputer Results.xml"
After running the cmdlet, open the generated XML file to view a detailed analysis of each check.
6. Synthetic Transactions
A feature carried over from Lync Server 2010
is synthetic transactions, which are a set of PowerShell cmdlets used
to simulate actions taken by servers or users in the environment. These
synthetic transactions allow an administrator to conduct realistic
tests against a service. In the case of a Mediation Server, the two
most useful synthetic transactions are Test-CSOutboundCall
and Test-CSPSTNPeertoPeerCall
.
When Test-CSOutboundCall
is run, a full outbound call is made to a phone number the
administrator provides. This transaction tests the policies, and
signaling and media connectivity to the PSTN. After the signaling path
has been established, the transaction sends DTMF tones to validate
media connectivity. Running this cmdlet requires a user account to
authenticate and register to Lync Server 2013, as well as a valid
destination phone number. The user credential parameter’s username and
password must be collected by an authentication dialog and saved to a
variable, as seen in this command:
$Credential = Get-Credential "COMPANYABC\randy"
After the credentials have been collected, the cmdlet can be run with the user credential variable previously saved:
Test-CsPstnOutboundCall -TargetFqdn <Front End
Pool FQDN> -TargetPstnPhoneNumber "+15551234567" -UserSipAddress
"sip:[email protected]" -UserCredential $credential
Here’s a Test-CSPSTNOutboundCall
example:
TargetFQDN : Lyncpool1.companyabc.com
Result : Success
Latency : 00:00:10.9506726
As seen in the output, the call was successful.
Test-CSPSTNPeertoPeerCall
is
very similar; however, it establishes a call between two Lync users
over the PSTN. This transaction logs in two Lync users, dials through
the PSTN gateway, and routes back in to Lync Server to connect to the
second user. The call is established, and then terminates on its own
after media connectivity has been validated. To run this cmdlet, you
must provide two valid user accounts in Lync Server 2013. See the
following text for an example.
The user credential parameter’s username and
password must be collected by an authentication dialog and saved to a
variable, as seen in the following command:
$Credential1 = Get-Credential "COMPANYABC\randy"
$Credential2 = Get-Credential "COMPANYABC\alex"
Test-CsPstnPeerToPeerCall
-TargetFqdn <FRONT END POOL FQDN> -SenderSipAddress
"sip:[email protected]" -SenderCredential $credential1
-ReceiverSipAddress "sip:[email protected]" -ReceiverCredential
$credential2
Here’s a Test-CSPSTNPSTNPeertoPeerCall
example:
TargetFQDN : Lyncpool1.companyabc.com
Result : Success
Latency : 00:00:10.9506726
As seen in the output, the call was successful.
7. Telnet
Telnet is a simple method of checking whether
a specific TCP port is available from a client machine. From a machine
that is having trouble contacting a Mediation Server, follow these
steps to verify connectivity to the Mediation Server service:
Tip
The Telnet client is not installed by default
in modern Windows operating systems. On a desktop operating system it
must be installed by using the Turn Windows Features On or Off option
found in Programs and Features. On a server operating system it can be
installed through the Features section of Server Manager.
1. Open a command prompt.
2. Type the following command:
telnet <Mediation Server pool FQDN> 5061
If the window goes blank and only a
flashing cursor is seen, it means the connection was successful and the
port can be contacted without issue. If the connection fails, an error
is returned. Check that the services are running on the Mediation
Server and that no firewalls are blocking the traffic.
8. Time
A key component of any service running
successfully in Lync Server 2013 is the computer time. Be sure to
verify that the clocks on any Lync Server 2013 servers are correctly
set and have the appropriate time zones configured. If the clocks
between a server and a client are off by more than five minutes,
Kerberos authentication will begin to fail, which will prevent users
from authenticating successfully.