PowerShell Logo Small

Set-TraceSource



This is the built-in help made by Microsoft for the command 'Set-TraceSource', in PowerShell version 2 - as retrieved from Windows version 'Microsoft® Windows Vista™ Ultimate ' PowerShell help files on 2016-06-23.

For PowerShell version 3 and up, where you have Update-Help, this command was run just before creating the web pages from the help files.

SYNOPSIS

Configures, starts, and stops a trace of Windows PowerShell components.

SYNTAX


Set-TraceSource [[-Option] {None | Constructor | Dispose | Finalizer | Method | Property | Delegates | Events | Exception | Lock | Error | Errors
| Warning | Verbose | WriteLine | Data | Scope | ExecutionFlow | Assert | All}] [-Debugger] [-FilePath <string>] [-Force] [-ListenerOption {None
| LogicalOperationStack | DateTime | Timestamp | ProcessId | ThreadId | Callstack}] [-PassThru] [-PSHost] [-Name] <string[]> [<CommonParameters>
]
Set-TraceSource [-RemoveListener <string[]>] [-Name] <string[]> [<CommonParameters>]
Set-TraceSource [-RemoveFileListener <string[]>] [-Name] <string[]> [<CommonParameters>]



Search powershellhelp.space

DESCRIPTION


The Set-TraceSource cmdlet configures, starts, and stops a trace of a Windows PowerShell component. You can use it to specify which components wi
ll be traced and where the tracing output is sent.



<

RELATED LINKS

Online version: http://go.microsoft.com/fwlink/?LinkID=113400
Get-TraceSource
Trace-Command
Set-PSDebug

REMARKS

<

Examples


-------------------------- EXAMPLE 1 --------------------------

C:\PS>Set-TraceSource -Name Parameterbinding -Option ExecutionFlow -PSHost '
-ListenerOption "ProcessID,TimeStamp"



Description
-----------
This command starts tracing for the ParameterBinding component of Windows PowerShell. It uses the Name parameter to specify the trace source, the
Option parameter to select the ExecutionFlow trace events, and the PSHost parameter to select the Windows PowerShell host listener, which sends
the output to the console. The ListenerOption parameter adds the "ProcessID" and "TimeStamp" values to the trace message prefix.








-------------------------- EXAMPLE 2 --------------------------

C:\PS>set-tracesource -name ParameterBinding -RemoveListener Host



Description
-----------
This command stops the trace of the ParameterBinding component of Windows PowerShell. It uses the Name parameter to identify the component that w
as being traced and the RemoveListener parameter to identify the trace listener.