Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Here's what I can tell so far:</p> <p>The Id property is the default display property for a thread object (System.Diagnostics.ProcessThread). I couldn't find any tracks of this in any of PowerShell's type files but I can change the way Format-* display threads (requires PowerShell 3.0).</p> <p>By default the format cmdlets prints the Id value of each thread object:</p> <pre><code>Threads : {1548, 1600, 15940, 13996} </code></pre> <p>Formatting cmdlets checks the value of the <code>$FormatEnumerationLimit</code> variable (default is 4) to decide how to format the object. If the result is one object (scalar) only it will print as:</p> <pre><code>Threads : 1548 </code></pre> <p>If it's a collection of items and the collection count is up to the value of <code>$FormatEnumerationLimit</code> (4) it will display as:</p> <pre><code>Threads : {1548, 1600, 15940, 13996} </code></pre> <p>A count greater than <code>$FormatEnumerationLimit</code> will look like (... indicates that there are more objects):</p> <pre><code>Threads : {1548, 1600, 15940, 13996...} </code></pre> <p>I can tell Id is the default property in use because I can change it to another property and see its value reflecting in the output. For example, Here I'm setting the ThreadState as the default display property:</p> <pre><code>PS&gt; Update-TypeData -TypeName System.Diagnostics.ProcessThread -DefaultDisplayProperty ThreadState -Force PS&gt; (Get-Process)[0] | Format-List -Property Threads Threads : {Wait, Wait, Wait, Wait...} # revert back PS&gt; Update-TypeData -TypeName System.Diagnostics.ProcessThread -DefaultDisplayProperty Id -Force </code></pre> <p>Hope that helps</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload