title: Running curl via powershell - how to construct arguments?
body: <p>I'm trying to run curl to upload a file in my script, using batch was painful because I need to do string manipulation etc so I turned to powershell.</p>
  
  <p>However I can't seem to get powershell to execute Curl:</p>
  
  <pre><code>$hash = "test"
  $fileToUpload = "hello world.txt"
  $user = "user"
  $password = "passy"
  curl --ftp-create-dirs -T $fileToUpload -u ${user}:${pass} ftp://example.com/$hash/$fileToUpload
  </code></pre>
  
  <p>This results in:</p>
  
  <pre><code>Invoke-WebRequest : Parameter cannot be processed because the parameter name 'T' is ambiguous. Possible matches include: 
  -TimeoutSec -TransferEncoding.
  At line:5 char:24
  + curl --ftp-create-dirs -T $fileToUpload -u ${user}:${pass} ftp://example.com/$ha ...
  +                        ~~
      + CategoryInfo          : InvalidArgument: (:) [Invoke-WebRequest], ParameterBindingException
      + FullyQualifiedErrorId : AmbiguousParameter,Microsoft.PowerShell.Commands.InvokeWebRequestCommand
  </code></pre>
  
  <p>Curl.exe is in my PATH.</p>