title: Object property string element, error passing into Get-ChildItem
body: <p>I'm having an issue piping a string element from an object into <code>Get-ChildItem</code>. My code is below:</p>
  
  <pre><code>$RegEx = 'Auto Apply Quota Path:\s+(.*)[\s\S]*?' +
           'Source Template:\s+(.*)\s+' +
           'Limit:\s+(.*)'
  [int]$i = 0
  [array]$objArr = @()
  
  (dirquota au l | Out-String) -split '\r\n\r\n' | Where-Object {
      $_ -match $RegEx
  } | ForEach-Object {
      $objArr += New-Object -Type PSObject -Property ([ordered]@{
          QuotaPath  = $matches[1]
          Template   = $matches[2]
          QuotaLimit = $matches[3]
      })
  }
  
  $objArr | % {
      gci $objArr[$i].QuotaPath
      $i++
  } | Export-Csv -Path 'E:\outfile.csv'
  </code></pre>
  
  <p>Now I'm pretty sure the problem is because dot-referencing the string element in the object returns the property of the string, which is <code>Length</code>, and I've verified this with the outfile.csv. I need the string itself and am not having any luck finding out how to get that.</p>
  
  <p>Below is the error message, which oddly contains the string I need, which is the UNC path, and it DOES exist:</p>
  
  <pre>gci : Illegal characters in path.
  At line:20 char:5
  +     gci $objArr[$i].QuotaPath
  +     ~~~~~~~~~~~~~~~~~~~~~~~~~
      + CategoryInfo          : InvalidArgument: (E:\Dir\Subdir:String) [Get-ChildItem], ArgumentException
      + FullyQualifiedErrorId : ItemExistsArgumentError,Microsoft.PowerShell.Commands.GetChildItemCommand
  
  gci : Cannot find path 'E:\Dir\Subdir' because it does not exist.
  At line:20 char:5
  +     gci $objArr[$i].QuotaPath
  +     ~~~~~~~~~~~~~~~~~~~~~~~~~
      + CategoryInfo          : ObjectNotFound: (E:\Dir\Subdir:String) [Get-ChildItem], ItemNotFoundException
      + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetChildItemCommand</pre>
  
  <p>The solutions I've seen online say to put the string into a custom object, but they're already in an object, so that doesn't help. I'm sure I'm missing something obvious.</p>