title: Computernames in Export-CSV in ForEach-Object
body: <p>I'm trying to get the installed .NET Framework version of each of the Computers in my <code>ComputerNames.csv</code> File.
  That's my Code so far:</p>
  
  <pre><code>$ComputerNames = Import-csv $ListPath\ComputerNames.csv
  $ComputerNames | ForEach-Object {
  Get-ChildItem 'HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP' -recurse |
  Get-ItemProperty -name Version -EA 0 |
  # Where { $_.PSChildName -match '^(?!S)\p{L}'} |
  Select Version
  } | Export-Csv "$ExportPath\FrameWorkVersion-$DateTime.csv"
  </code></pre>
  
  <p>When I run this code, it creates a CSV Output of all the installed .NET Framework Versions, which is nice. But i'd like to have it sortet to the computername.</p>
  
  <p>It's difficult for me to explain this in english so here's an example:</p>
  
  <p>Output so far:</p>
  
  <pre><code>TYPE Selected.System.Management.Automation.PSCustomObject
  Version
  2.0.50727.4927
  2.0.50727.4927
  3.0.30729.4926
  3.0.30729.4926
  3.0.30729.7903
  3.0.4506.4926
  3.0.6920.4902
  3.5.30729.4926
  3.5.30729.5003
  4.5.51641
  4.5.51641
  4.5.51641
  </code></pre>
  
  <p>I'd like to have it like this:</p>
  
  <pre><code>TYPE Selected.System.Management.Automation.PSCustomObject
  Version
  Computer 1
  2.0.50727.4927
  2.0.50727.4927
  3.0.30729.4926
  3.0.30729.4926
  3.0.30729.7903
  Computer 2
  3.0.4506.4926
  3.0.6920.4902
  3.5.30729.4926
  3.5.30729.5003
  4.5.51641
  Computer 3
  4.5.51641
  4.5.51641
  </code></pre>
  
  <p>Is that possible?</p>