title: Cannot convert 'System.Object[]' to the type 'System.String' required by parameter 'Path'. Specified error
body: <p>I am getting the below error when running powershell script</p>
  
  <blockquote>
    <p><strong>Set-Location : Cannot convert 'System.Object[]' to the type 'System.String' required by parameter 'Path'. Specified 
    error      15-May-2018 08:31:42    method is not supported.</strong></p>
  </blockquote>
  
  <p>Below is the script which is having issues, Could you please suggest what is wrong here</p>
  
  <pre><code>cd $lsolutionPath
      Get-ChildItem -Path "$lsolutionPath" -Filter "*Tests" -Recurse -Directory | where {$_.FullName -inotlike "*.sonarqube*"} | ForEach-Object {
      $fullName = $_.FullName
      $projName = $_.BaseName
      write-output $projName
      write-output $fullName
  
      Write-Output "Starting Build Helper unit test run:3"
      $tests = Get-ChildItem -Path "$fullName" -Recurse -Include *.dll
      Write-Output "Starting Build Helper unit test run:4"
      if($tests -eq $null) {
          Write-Error "Could not find *Tests.dll"
          return 999
          }
  
      cd $tests.Directory
      Write-Output $tests.Directory
      Write-Output "target args"
      $targetArgs = "\""$tests\"" -nologo -parallel none -noshadow -xml \""$xUnittestResultsPath\$projName.xml\"" -nunit \""$testResultsPath\$projName.xml\"""
      Write-Output "$target args"
       Write-Output "###### Target Args:"**
  </code></pre>