title: PowerShell OutputType attribute not working
body: <p>The <code>OutputType</code> attribute is supposed to give type information through intellisense. However it does not work as expected.  </p>
  
  <p>I have tested this in both PSReadline and PowerShell ISE and they work the same.</p>
  
  <p>The following is a sample function I am using:</p>
  
  <pre><code>Function Get-FirstChar
  {
      [OutputType([String])]
      [CmdletBinding()]
  
      param(
        [Parameter(Mandatory=$true, ValueFromPipeline=$true)][string[]]$Strings
      )
  
      process {
          foreach ($str in $Strings) {
              $str.SubString(0, 1);
          }   
      }
  }
  </code></pre>
  
  <p>When I do:</p>
  
  <pre><code>
  "John","Simon" | Get-FirstChar | % { $_.&lt;TAB> }
  </code></pre>
  
  <p>I get the suggestions (regardless of platform):</p>
  
  <pre><code>Equals       GetHashCode  GetType      ToString
  </code></pre>
  
  <p>However when I do:</p>
  
  <pre><code>("John","Simon" | Get-FirstChar).&lt;TAB>
  </code></pre>
  
  <p>Then I get all the string methods like <code>SubString</code> etc.</p>
  
  <p>I have also tried a string array <code>String[]</code> as the output type and it still don't work :(</p>
  
  <p>Can someone shed like on how to use <code>OutputType</code> attribute to say that one or more strings will be returned from a powershell function?</p>
  
  <p>Thank you</p>