title: Start-Process The system cannot find the file specified
body: <p>Need some help to find the problem with the below.</p>
  
  <p>The issue is around the $setup </p>
  
  <p>Start-Process -workingdirectory c:\temp $setup -wait</p>
  
  <pre><code>        $storageDir = 'C:\Temp'
          $file = '1.1.1.1'
          $SpecIP = '192.168.0.87'
          $password = ConvertTo-SecureString "Password" -AsPlainText -Force
          $user = "User1"
          $cred = New-Object System.Management.Automation.PSCredential    ($user,$password)
    $rsName =  'Responses.txt'
          $setup = "$file.exe $rsName"
  </code></pre>
  
  <p>The following works I hard code the value </p>
  
  <pre><code>Invoke-Command -ComputerName $SpecIP -Credential $cred -ScriptBlock {
  param($setup)
  Start-Process -workingdirectory c:\temp 1.1.1.1 Responses.txt -wait
  } -ArgumentList $setup
  </code></pre>
  
  <p>Not working the only different is the $setup</p>
  
  <pre><code>Invoke-Command -ComputerName $SpecIP -Credential $cred -ScriptBlock {
  param($setup)
  Start-Process -workingdirectory c:\temp $setup -wait
  } -ArgumentList $setup
  </code></pre>
  
  <p>Error</p>
  
  <blockquote>
    <p>This command cannot be run due to the error: The system cannot find the file specified.
        + CategoryInfo          : InvalidOperation: (:) [Start-Process], InvalidOperationException
        + FullyQualifiedErrorId : InvalidOperationException,Microsoft.PowerShell.Commands.StartProcessCo 
       mmand
        + PSComputerName        : 192.168.0.87</p>
  </blockquote>