title: PowerShell: write value in a input type=file Form.
body: <p>I have a <strong>input type=text</strong> inputboxes on a webpage I load and fill with values and click the submit button which works fine:</p>
  
  <pre><code>$ie=New-Object -comobject InternetExplorer.Application 
  $ie.visible=$true 
  $ie.Navigate("https://myurl/test.html") 
  while($ie.busy){Start-Sleep 1} 
  $ie.Document.getElementById("field_firstName").value="Firstname" 
  $ie.Document.getElementById("field_lastName").value="Lastname" 
  $ie.Document.getElementById("btn_upload").Click() 
  while($ie.busy){Start-Sleep 1}
  </code></pre>
  
  <p>I'd also like to populate a <strong>input type=file</strong> box with c:\temp\test.txt and upload this.
  I read that because of security reasons the value= is not supported from the browsers.</p>
  
  <p>Is there any workaround to do this with PowerShell?
  Maybe "click" the browse button and select the file or use sendkeys? </p>