18.6. The set-tracesource Cmdlet
The set-tracesource cmdlet sets or removes options or trace source listeners from a specified trace source instance.
In addition to the common parameters, the set-tracesource cmdlet supports the following parameters:
Name — Specifies the trace source categories that will be affected. A required parameter that is also a positional parameter, taking position 1.
Option — The flags to be set on the trace source. The allowed values are listed in the section on the trace-expression cmdlet.
FilePath — Adds the file trace listener using a specified file.
Debugger — Adds the debugger trace listener.
PSHost — Adds the MSH host trace listener.
ListenerOption — Specifies listener options.
PassThru — Boolean. If true, the modified object is written to the pipeline.
RemoveListener — Optional. If specified, removes all named listeners.
RemoveFileListener — Optional. If specified, removes named file listeners.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access