Edit

Share via


Search-CsClsLogging

Provides a command-line option for searching the centralized logging service log files. This cmdlet was introduced in Lync Server 2013.

Syntax

Default (Default)

Search-CsClsLogging
    [-AsXml]
    [-CallId <String>]
    [-Components <String[]>]
    [-Computers <String[]>]
    [-ConferenceId <String>]
    [-CorrelationIds <String[]>]
    [-EndTime <DateTime>]
    [-IP <IPAddress>]
    [-LogLevel <String>]
    [-MatchAll]
    [-MatchAny]
    [-OutputFilePath <String>]
    [-Phone <String>]
    [-Pools <String[]>]
    [-SipContents <String>]
    [-SkipNetworkLogs]
    [-StartTime <DateTime>]
    [-Uri <String>]
    [<CommonParameters>]

Description

The centralized logging service (which replaces the OCSLogger and OCSTracer tools used in Microsoft Lync Server 2010) provides a way for administrators to manage logging and tracing for all computers and pools running Skype for Business Server. Centralized logging enables administrators to stop, start and configure logging for one or more pools and computers by using a single command; for example, you can use one command to enable Address Book service logging on all your Address Book servers. This differs from the OCSLogger and OCSTracer tools, which had to be individually managed (including individually stopped and started) on each server. In addition, the centralized logging service also provides a way for administrators to search trace logs from the command, using the Windows PowerShell command-line interface and the Search-CsClsLogging cmdlet.

Centralized logging is built around a series of predefined scenarios that offer a more finely-targeted approach to logging than offered in previous versions of Skype for Business Server. These scenarios predetermine the server components and logging for you; as a result, an administrator enabling the RGS scenario can be confident that he or she will only log information relevant to the Response Group service and not to, say, the audio conferencing provider service.

The Search-CsClsLogging cmdlet provides a command line option for searching the log files generated by the centralized logging service.

Skype for Business Server Control Panel: The functions carried out by the Search-CsClsLogging cmdlet are not available in the Skype for Business Server Control Panel.

Examples

Example 1

Search-CsClsLogging -Computers "atl-cs-001.litwareinc.com" -IP "192.168.0.242"

The command shown in Example 1 searches for the IP address 192.168.0.242 in the log files found on the computer atl-cs-001.litwareinc.com.

Example 2

Search-CsClsLogging -Computers "atl-cs-001.litwareinc.com" -IP "192.168.0.242" -Uri "sip:kenmyer@litwareinc.com" -MatchAll

In Example 2, a search is made for entries that match both the IP address 192.168.0.242 and the Uri sip:kenmyer@litwareinc.com. The MatchAll parameter specifies that all the criteria must be met for an entry to be recorded as a match.

Example 3

Search-CsClsLogging -Computers "atl-cs-001.litwareinc.com" -IP "192.168.0.242" -Uri "sip:kenmyer@litwareinc.com" -MatchAny

The command shown in Example 3 searches for entries that match either the IP address 192.168.0.242 or the Uri sip:kenmyer@litwareinc.com. The MatchAny parameter specifies that just one of the criteria must be met for an entry to be recorded as a match.

Parameters

-AsXml

Applicable: Lync Server 2013, Skype for Business Server 2015, Skype for Business Server 2019

When specified, return code information from each computer searched is returned in XML format instead of as a string value.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-CallId

Applicable: Lync Server 2013, Skype for Business Server 2015, Skype for Business Server 2019

Call identifier to be searched for.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Components

Applicable: Lync Server 2013, Skype for Business Server 2015, Skype for Business Server 2019

Comma-separated list of components to be searched.

Parameter properties

Type:

String[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Computers

Applicable: Lync Server 2013, Skype for Business Server 2015, Skype for Business Server 2019

Comma-separated list of the computers to be searched. For example:

-Computers "server-cs-001.litwareinc.com", "server-cs-002.litwareinc.com"

Parameter properties

Type:

String[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ConferenceId

Applicable: Lync Server 2013, Skype for Business Server 2015, Skype for Business Server 2019

Conference ID to be searched for.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-CorrelationIds

Applicable: Lync Server 2013, Skype for Business Server 2015, Skype for Business Server 2019

Comma-separated list of correlation IDs to search for. A correlation is a 32 bit integer associated with each request.

Parameter properties

Type:

String[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-EndTime

Applicable: Lync Server 2013, Skype for Business Server 2015, Skype for Business Server 2019

Ending date and time for the log entries to be searched. Specified in local time zone. Defaults to 5 minutes after current time if no StartTime specified, otherwise defaults to 30 minutes after StartTime. For example, on computer running the US English version of Skype for Business Server, this syntax limits the search to entries recorded prior to 8:00 AM on August 31, 2012:

-EndTime "8/31/2012 8:00AM"

Parameter properties

Type:DateTime
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-IP

Applicable: Lync Server 2013, Skype for Business Server 2015, Skype for Business Server 2019

IP address being searched for. This must be an actual IP address; you cannot use wildcards when specifying the address.

Parameter properties

Type:IPAddress
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-LogLevel

Applicable: Lync Server 2013, Skype for Business Server 2015, Skype for Business Server 2019

Specifies the minimum type of log entry to be returned. Allowed values are:

Fatal

Error

Warning

Info

Verbose

Debug

All

"Minimum type of entry to be returned" means that the Search-CsClsLogging cmdlet will return all log entries at that level of severity plus all log entries with a higher level of severity. For example, if you set the LogLevel to Warning then the cmdlet will return entries marked as Fatal and Error as well as entries marked as Warning.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-MatchAll

Applicable: Lync Server 2013, Skype for Business Server 2015, Skype for Business Server 2019

When present, all the included criteria must be matched. This is similar to an AND query in SQL Server.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-MatchAny

Applicable: Lync Server 2013, Skype for Business Server 2015, Skype for Business Server 2019

When present, only one of the included criteria must be matched. This is similar to an OR query in SQL Server. This is the default.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-OutputFilePath

Applicable: Lync Server 2013, Skype for Business Server 2015, Skype for Business Server 2019

When present, specifies the full path of where to write a text file containing the search results. Otherwise they are written to the console.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Phone

Applicable: Lync Server 2013, Skype for Business Server 2015, Skype for Business Server 2019

Phone number to be searched for. This number should be entered using the E.164 format and should not include wildcard characters.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Pools

Applicable: Lync Server 2013, Skype for Business Server 2015, Skype for Business Server 2019

Comma-separated list of the pools to be searched. For example:

-Pools "atl-cs-001.litwareinc.com", "red-cs-001.litwareinc.com"

Parameter properties

Type:

String[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-SipContents

Applicable: Lync Server 2013, Skype for Business Server 2015, Skype for Business Server 2019

Arbitrary text to search for within the body of a SIP message.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-SkipNetworkLogs

Applicable: Lync Server 2013, Skype for Business Server 2015, Skype for Business Server 2019

When present, instructs the Search-CsClsLogging cmdlet to avoid searching network logs.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-StartTime

Applicable: Lync Server 2013, Skype for Business Server 2015, Skype for Business Server 2019

Beginning date and time for the log entries to be searched. Specified in local time zone. Defaults to 30 minutes before EndTime. For example, on computer running the US English version of Skype for Business Server, this syntax limits the search to entries recorded at 8:00 AM on or after August 1, 2012:

-StartTime "8/1/2012 8:00AM"

Parameter properties

Type:DateTime
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Uri

Applicable: Lync Server 2013, Skype for Business Server 2015, Skype for Business Server 2019

Uri to be searched for.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

None

The Search-CsClsLogging cmdlet does not accept pipelined input.

Outputs

System.Stringvalues or XML.