18.7. The get-tracesource Cmdlet
The get-tracesource cmdlet lists properties for given trace sources.
In addition to the common parameters, the get-tracesource cmdlet supports one parameter:
Name — Specifies trace sources
To find all the possible values for the Name parameter of the trace-command cmdlet, use this command:
get-tracesource -Name *
You can count the number of trace sources available to you using the following code:
$TraceSources = get-tracesource -Name * $TraceSources.Count
In the version I am running at the time of writing, there are 173 values possible for the Name parameter.
The command
get-tracesource -Name Param*
returns information about all trace sources whose name begins with Param. The results of executing the preceding command are shown in Figure 18-21.
Figure 18.21. Figure 18-21
Get Professional Windows® PowerShell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.