title: Powershell Invoke-Webrequest "No file part in file" CURL to Powershell
body: <p>I'm trying to convert this working request done in Cygwin to Powershell:</p>
  
  <p>Cygwin (Working):</p>
  
  <pre><code>curl -k -u curl:Password -X PUT -F "file=$($_)" https://$($appliance)/wse/customblockpage/file/en
  </code></pre>
  
  <p>Powershell (not working):</p>
  
  <pre><code>Invoke-Webrequest -Uri "https://$($appliance)/wse/customblockpage/file/en" -Method Put -Infile "$homePath\$($_)" -Credential $cred
  </code></pre>
  
  <p>Here is the error I get:</p>
  
  <blockquote>
    <p>Invoke-Webrequest : { "Error": "No file part in file", "Result": "Failure" }
    At line:1 char:1
    + Invoke-Webrequest https://{IP Address Masked}/wse/customblockpage/file/en  ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest], WebException
        + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand</p>
  </blockquote>