title: Error splatting single line string from ConvertFrom-StringData
body: <p>In trying to answer <a href="https://stackoverflow.com/questions/27630925/native-mechanism-for-parsing-input-parameter-value-pairs-from-string/27631598#27631598">this question</a> I was trying to show examples of splatting with string data from <code>Read-Host</code> which does work to a point. </p>
  
  <pre><code>PS C:\temp&gt; $results = (Read-Host) -Split ";" | ConvertFrom-StringData
  Get-ChildItem @results
  
  Filter=*.txt;Path="C:\\temp" &lt;--- This was typed in for Read-host
  </code></pre>
  
  <p>The hashtable is created successfully, or so i assumed, however when trying to splat it I get the following error:</p>
  
  <pre><code>Get-ChildItem : Cannot find path 'C:\temp\System.Collections.Hashtable' because it does not exist.
  At line:2 char:1
  + Get-ChildItem @results
  + ~~~~~~~~~~~~~~~~~~~~~~
      + CategoryInfo          : ObjectNotFound: (C:\temp\System.Collections.Hashtable:String) [Get-ChildItem], ItemNotFoundException
      + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetChildItemCommand
  </code></pre>
  
  <p>Seems that the issue is im not getting a <code>hashtable</code> but a <code>System.Object[]</code></p>
  
  <pre><code>$results.GetType().Fullname
  System.Object[]
  </code></pre>
  
  <p>Root of my issue is <code>ConvertFrom-StringData</code> is not returning a hashtable like I would have expected it to. </p>
  
  <p>How can I convert the string "Filter=*.txt;Path=C:\temp" to a hashtable? I know I can use here strings in general but this is being typed from read host so a single line string is what im trying to convert. </p>
  
  <p><strong>Possible Answer</strong></p>
  
  <p>Since <code>ConvertFrom-StringData</code>likes new lines I was able to hack this out. </p>
  
  <pre><code>PS C:\temp&gt; $hashFromStringData = ("Filter=*.txt;Path=C:\\temp" -Split ";") -Join "`r`n" | ConvertFrom-StringData
  $hashFromStringData.GetType().FullName
  
  System.Collections.Hashtable
  </code></pre>
  
  <p>Not sure if there is a better way. </p>