title: Use powershell to automate file download from website (dont know the url to file)
body: <p>I want to automate a daily download of a report from our credit card provider's website.</p>
  
  <p>The file is dynamically generated, so I wont know the actual URL for the file itself.</p>
  
  <p>I'm able to use powershell to navigate and login to the web page, and to click the "Download Report" button.  But then the "File Download" dialog box appears, and I cant figure out how to press the "Save" button on that dialog.  </p>
  
  <p>It seems like my options are:</p>
  
  <ul>
  <li><p>Somehow find that window, and try sending keystrokes</p></li>
  <li><p>Somehow find the URL of the file when the dialog appears, and then download directly.</p></li>
  <li><p>Find a way to disable "File Download" box in ie.  (putting it in trusted sites didnt work)</p></li>
  </ul>
  
  <p>I'm using:  </p>
  
  <pre><code>$ie = New-Object -com "InternetExplorer.Application"
  </code></pre>
  
  <p>What would you suggest is the best approach?</p>