Another tool included in the Lync Server 2013 Debugging Tools is the ClsController.psm1
file. It is a PowerShell module used to customize the CLS scenarios and can be tailored to satisfy our troubleshooting needs. In the module, we have a cmdlet, Edit-CsClsScenario
, which we will use for an example of customization.
Import-Module "C:Program FilesMicrosoft Lync Server 2013Debugging ToolsClsController.psm1"
Get-Command -Module ClsController
$testprov = New-CsClsProvider -Name "Testprov" -Type "WPP" -Level "Info" -Flags "All"
New-CsClsScenario -Identity "global/TestprovScen" -Provider $testprov
If we are going to customize an existing scenario, we need to know the providers we want to remove or add. To see a list of the default providers, we can use the Get-CsClsScenario
cmdlet. For example, for TestprovScen
, use the following:
$scenario=Get-CsClsScenario global/TestprovScen foreach ($sc in $scenario.provider) { $sc.name }
Edit-CsClsScenario -ScenarioName TestprovScen -ProviderName ServerAgent -Level Verbose -Flags All
Get-CsClsScenario
, as we have seen before, we will get the result as shown in the following screenshot. The ServerAgent has been added to the scenario.–remove
option. There is no support for the –Level
and the –Flags
option, so to remove the ServerAgent provider in the previously mentioned example, we should use the following:Edit-CsClsScenario -ScenarioName TestprovScen -ProviderName ServerAgent –Remove
3.143.255.36