title: Is a string parameter sent to PowerShell not really a string?
body: <p>I am bit confused of the behaviour of the script below:</p>
  
  <p>Test.ps1:</p>
  
  <pre><code>param(
      [array]$Value = $(throw "Give me a value")
  )
  
  Write-Host $Value 
  $Value | Get-Member -MemberType Method
  $Value.ToUpper()
  </code></pre>
  
  <p>Running the script:</p>
  
  <pre><code>PS C:\Temp&gt; .\weird.ps1 test
  TypeName: System.String
  Name MemberType Definition
  —- ———- ———-
  …
  ToUpper Method string ToUpper(), string ToUpper(System.Globalization.CultureInfo culture)
  …
  Method invocation failed because [System.Object[]] doesn’t contain a method named ‘ToUpper’.
  At C:\Temp\weird.ps1:6 char:15
  + $Value.ToUpper &lt;&lt;&lt;&lt; ()
  + CategoryInfo : InvalidOperation: (ToUpper:String) [], RuntimeException
  + FullyQualifiedErrorId : MethodNotFound
  </code></pre>
  
  <p>Why do I get a MethodNotFound exception? Get-Member clearly says it is a string. </p>