title: Some .NET 4.0 Classes in PowerShell do not seem to work
body: <p>I am creating a powershell script that uses some <code>System.Diagnostics.Process</code> and <code>System.Diagnostics.ProcessStartInfo</code> classes.</p>
  
  <p>These classes work completely fine like this:</p>
  
  <pre><code>$processInfo = new-object System.Diagnostics.ProcessStartInfo
  
  $processInfo.FileName = "dism.exe"
  $processInfo.UseShellExecute = $false
  $processInfo.RedirectStandardOutput = $true
  $processInfo.Arguments = "/Apply-Image /ImageFile:C:\images\Win864_SL-IN-837.wim /ApplyDir:D:\ /Index:1"
  
  $process = new-object System.Diagnostics.Process
  $process.StartInfo = $processInfo
  </code></pre>
  
  <p>However, I also want to use a System.IO.StreamReader class but when I try the EXACT same thing with like this:</p>
  
  <pre><code>$stream = new-object System.IO.StreamReader
  </code></pre>
  
  <p>or like this</p>
  
  <pre><code>$stream = new-object System.IO.StreamReader $process.FileName
  </code></pre>
  
  <p>I get the error:</p>
  
  <pre><code>New-Object : Constructor not found. Cannot find an appropriate constructor for type System.IO.StreamReader.
  At C:\Users\a-mahint\Documents\Testing\inter.ps1:17 char:21
  + $stream = new-object &lt;&lt;&lt;&lt;  System.IO.StreamReader
      + CategoryInfo          : ObjectNotFound: (:) [New-Object], PSArgumentException
      + FullyQualifiedErrorId : CannotFindAppropriateCtor,Microsoft.PowerShell.Commands.NewObjectCommand
  </code></pre>
  
  <p>I have been trying to figure this out for half an hour... what is going on? both Classes are part of .NET 4.0</p>