Pages

Friday, March 18, 2011

Testing Lync

There are 38 different test commands available in your Lync installation.
Open up the Lync Server Management Shell and you can easily list them all with the command:

Get-Command Test-*

Many of the test commands require one or two sip enabled users to run, so the first thing to do would be to store the credentials of these accounts into two variables that can be used later on:

$user1 = Get-Credential "kressmarkuc\mk"
$user2 = Get-Credential "kressmarkuc\ik"

Running these two commands will prompt you to enter the credentials of the users you selected.

When this is done, you do not have to enter the credentials every time we would like to run a command, and this gives us the possibility to build a longer test script, something like this...

Test-CsRegistration -TargetFqdn pool01.kressmarkuc.se -UserCredential $user1 -UserSipAddress "sip:mk@kressmarkuc.se"
Test-CsClientAuth -TargetFqdn pool01.kressmarkuc.se -UserSipAddress "sip:mk@kressmarkuc.se" -UserCredential $user1
Test-CsP2PAV -TargetFqdn pool01.kressmarkuc.se -SenderSipAddress "sip:mk@kressmarkuc.se" -SenderCredential $user1 -ReceiverSipAddress "sip:ik@kressmarkuc.se" -ReceiverCredential $user2
Test-CsPresence -TargetFqdn pool01.kressmarkuc.se -SubscriberSipAddress "sip:mk@kressmarkuc.se" -SubscriberCredential $user1 -PublisherSipAddress "sip:ik@kressmarkuc.se" -PublisherCredential $user2
Test-CsIm -TargetFqdn pool01.kressmarkuc.se -SenderSipAddress "sip:mk@kressmarkuc.se" -SenderCredential $user1 -ReceiverSipAddress "sip:ik@kressmarkuc.se" -ReceiverCredential $user2
Test-CsGroupIm -TargetFqdn pool01.kressmarkuc.se -SenderSipAddress "sip:mk@kressmarkuc.se" -SenderCredential $user1 -ReceiverSipAddress "sip:ik@kressmarkuc.se" -ReceiverCredential $user2
Test-CsAVConference -TargetFqdn pool01.kressmarkuc.se -SenderSipAddress "sip:mk@kressmarkuc.se" -SenderCredential $user1 -ReceiverSipAddress "sip:ik@kressmarkuc.se" -ReceiverCredential $user2
Test-CsAddressBookService -TargetFqdn pool01.kressmarkuc.se -UserSipAddress "sip:mk@kressmarkuc.se" -UserCredential $user1

...and then you could simply add on additional Test- or other commands appropriate for your installation and your testing.

A final test command if you have enterprise voice and outbound dialling going:

Test-CsPstnOutboundCall -TargetFqdn pool01.kressmarkuc.se -TargetPstnPhoneNumber "46731234567" -UserSipAddress "sip:mk@kressmarkuc.se" -UserCredential $user1

This will actually call up the number given, so make sure it is your own phone number.

Good luck testing your system, and I hope you will never receive an error :-)

For the full documentation of all Cmdlets, see:

No comments:

Post a Comment