Lync Server has numerous “Test-“ cmdlets that will allow for Lync administrators to validate certain functions. Below are just some of the “Test-“ cmdlets that are available (a full list can be viewed here):
- Test-CsAddressBookService
- Test-CsAddressBookWebQuery
- Test-CsAVConference
- Test-CsDialinConferencing
- Test-CsGroupIM
- Test-CsIM
- Test-CsP2PAV
- Test-CsRegistration
When trying to run one of these cmdlets, you will get the following error: “There is no test user assigned for <poolName>. Please check test user settings.”
Our example runs the following command:
Test-CsIM –TargetFQDN pool.twhlab.com
You could run this command and specify user accounts, passwords, and SIP addresses every time, but this can get a bit cumbersome if you plan on using the “Test-“ cmdlets frequently or use an automated job.
The following procedure will show you how to configure user accounts to be used with synthetic transactions.
First Step - Create two user accounts
These can be (and should be) disabled since these accounts will only be used to run the “Test-“ cmdlets. After creating the AD accounts, enable them for Lync.
Note: you should create two test accounts for each Lync pool.
Second Step - Configure the Lync test accounts for Synthetic Transactions
Run the following command:
New-CsHealthMonitoringConfiguration –Identity <poolName> –FirstTestSamAccountName <FirstUserAccount> –FirstTestUserSipUri <FirstUserSIPAddress> –SecondTestSamAccountName <SecondUserAccount> –SecondTestUserSipUri <SecondUserSIPAddress>
In my example, I run:
New-CsHealthMonitoringConfiguration –Identity pool.twhlab.com –FirstTestSamAccountName Homelab\LyncSynthUser1 –FirstTestUserSipUri “sip:LyncSynthUser1@twhlab.com” –SecondTestSamAccountName Homelab\LyncSynthUser2 –SecondTestUserSipUri “sip:LyncSynthUser2@twhlab.com”
Once the accounts have been configured, you can change or remove the configurations with the Set-CsHealthMonitoringConfiguration or Remove-CsHealthMonitoringConfiguration cmdlets.
Step Three – Test the configuration
Now that the accounts have been provisioned and configured for synthetic transactions, it is time to test. If the accounts were set up correctly, you should be able to run previous command that failed (without specifying users or credentials):
Test-CsIM –TargetFQDN pool.twhlab.com
Configuring synthetic transactions allows administrators to run tests without having to supply user names or passwords for the required test accounts.