Gets the Windows PowerShell components that are instrumented for tracing.

Syntax

Get-TraceSource [[-Name] <string[]>] [<CommonParameters>]

Description

The Get-TraceSource cmdlet gets the trace sources for Windows PowerShell components that are currently in use. You can use the data to determine which Windows PowerShell components you can trace. When tracing, the component generates detailed messages about each step in its internal processing. Developers use the trace data to monitor data flow, program execution, and errors. The tracing cmdlets were designed for Windows PowerShell developers, but they are available to all users.

Parameters

-Name <string[]>

Gets only the specified trace sources. Wildcards are permitted. The parameter name ("Name") is optional.

Required?

false

Position?

1

Default Value

none

Accept Pipeline Input?

true (ByValue, ByPropertyName)

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters.

Inputs and Outputs

The input type is the type of the objects that you can pipe to the cmdlet. The return type is the type of the objects that the cmdlet returns.

Inputs

System.String

You can pipe a string that contains the name of a trace source to Get-TraceSource.

Outputs

System.Management.Automation.PSTraceSource

Get-TraceSource returns objects that represent the trace sources.

Example 1

C:\PS>get-traceSource  *provider*

This command gets all of the trace sources that have names that include "provider".






Example 2

C:\PS>get-tracesource

This command gets all of the Windows PowerShell components that can be traced.






See Also




Table Of Contents