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 -UserCredential $user1 -UserSipAddress ""
Test-CsClientAuth -TargetFqdn -UserSipAddress "" -UserCredential $user1
Test-CsP2PAV -TargetFqdn -SenderSipAddress "" -SenderCredential $user1 -ReceiverSipAddress "" -ReceiverCredential $user2
Test-CsPresence -TargetFqdn -SubscriberSipAddress "" -SubscriberCredential $user1 -PublisherSipAddress "" -PublisherCredential $user2
Test-CsIm -TargetFqdn -SenderSipAddress "" -SenderCredential $user1 -ReceiverSipAddress "" -ReceiverCredential $user2
Test-CsGroupIm -TargetFqdn -SenderSipAddress "" -SenderCredential $user1 -ReceiverSipAddress "" -ReceiverCredential $user2
Test-CsAVConference -TargetFqdn -SenderSipAddress "" -SenderCredential $user1 -ReceiverSipAddress "" -ReceiverCredential $user2
Test-CsAddressBookService -TargetFqdn -UserSipAddress "" -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 -TargetPstnPhoneNumber "46731234567" -UserSipAddress "" -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