title: PowerShell Script and Form Authentication
body: <p>I have a PowerShellScript that will call a webpage and the webpage is doing some code-behind work.  The issue I am trying to resolve is that I'd like to make the webpage as a secured web page, but once I do that, I couldn't figure out a way to pass the username and password to the secured webpage from PowerShell Script.  I am using the form authentication.  I'd appreciate if anyone could provide a completed code sample so that I can just plug-in and do the magic.  Thanks so much!</p>
  
  <p>p.s. I've already tried the System.Net.NetworkCredential, but it seems it is for the basic authentication.</p>
  
  <pre><code>$url = "someurl"
  $webclient = New-Object System.Net.WebClient
  $webclient.DownloadString($url)
  </code></pre>