title: PowerShell equivalent for cURL command uploading file
body: <p>I am able to send HTTP POST a text file to my server using the following cURL command:</p>
  
  <pre><code>curl -i -F file=@file.txt http://www.website.com/put_file
  </code></pre>
  
  <p>The server is expecting a file from $_FILES['file'].</p>
  
  <p>I have the following so far but it is not working:</p>
  
  <pre><code>$url = http://www.website.com/put_file
  $file = "c:\file.txt"
  $wc = new-object System.Net.WebClient
  $wc.UploadFile($url, $file.FullName)
  </code></pre>
  
  <p>it returns 0, and it did not upload to the server</p>
  
  <p>How can I send the file as $_FILES['file']? Also, how can I see the response from the server?</p>