Customizing CLS scenarios using CLSController

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.

How to do it...

  1. Launch the Lync Management Shell and use the following cmdlet:
    Import-Module "C:Program FilesMicrosoft Lync Server 2013Debugging ToolsClsController.psm1"
    
  2. We can check whether the module has been loaded correctly using the following command:
    Get-Command -Module ClsController 
    
  3. It is advisable to define a new scenario. The first step is to define the provider:
    $testprov = New-CsClsProvider -Name "Testprov" -Type "WPP" -Level "Info" -Flags "All"
    
  4. Then, we have to define a new policy:
    New-CsClsScenario -Identity "global/TestprovScen" -Provider $testprov
    
  5. We will receive a confirmation message, as shown in the following screenshot:
    How to do it...

    Note

    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 }
    
  6. To add a provider, like the ServerAgent (with verbose level and all the flags selected), we can use the following command:
    Edit-CsClsScenario -ScenarioName TestprovScen -ProviderName ServerAgent -Level Verbose -Flags All
    
  7. By running 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.
    How to do it...
  8. To remove a provider, add the –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
    

See also

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.143.255.36