title: ValueFromPipeline behavior?
body: <p>I have a command <code>Get-Testdata</code> that retrieves test data from different sources and stores these into a <code>PSObject</code> with the different values as properties. The total number of objects are then stored as an array, for easy manipulation, sorting, calculating etc.</p>
  
  <p>My problem is that I want to be able to present this data as (color-coded) HTML, for which I've written another command, <code>Show-TestResults</code>. The input parameter looks like this</p>
  
  <pre><code>[Parameter(Mandatory=$true,Position=0,ValueFromPipeline=$true)]
  [PSObject[]]$InputObject
  </code></pre>
  
  <p><strong>UPDATE 1</strong></p>
  
  <p>This function itself is very basic, it simply sets some parameters for <code>ConvertTo-HTML</code> and then pipe the objects into that command:</p>
  
  <pre><code>$head = "&lt;style&gt;[...]" #styling with javascript etc
  $header = "&lt;H1&gt;Test Results&lt;/H1&gt;
  $title = "Test results"
  $InputObject | ConvertTo-HTML -head $head -body $header -title $title | Out-File $Filename
  </code></pre>
  
  <p><strong>END UPDATE 1</strong></p>
  
  <p>However, when I try to use the <code>ValueFromPipeline</code> property, using the call</p>
  
  <pre><code>Get-Testdata [...] | Show-TestResults 
  </code></pre>
  
  <p>only the first object in the array is shown. But if I instead call the command like</p>
  
  <pre><code>$td = Get-Testdata [...]
  Show-TestResults $td 
  </code></pre>
  
  <p>The whole array is presented, as expected. Can someone explain this - and hopefully guide me into correcting it?</p>