title: Powershell: Download or Save source code for whole ie page
body: <p>I have this PS script it logins to a site and then it navigate's to another page.</p>
  
  <p>I want to save whole source for that page. but for some reason. some parts of source code is not coming across.</p>
  
  <pre><code>$username = "myuser" 
  $password = "mypass"
  $ie = New-Object -com InternetExplorer.Application
  $ie.visible=$true
  $ie.navigate("http://www.example.com/login.shtml")
  while($ie.ReadyState -ne 4) {start-sleep -m 100}
  $ie.document.getElementById("username").value = "$username"
  $ie.document.getElementById("pass").value = "$password"
  $ie.document.getElementById("frmLogin").submit()
  start-sleep 5
  $ie.navigate("http://www.example.com/thislink.shtml")
  $ie.Document.body.outerHTML | Out-File -FilePath c:\sourcecode.txt
  </code></pre>
  
  <p><br>Here is pastebin of code which is not coming across<br>
  <a href="http://pastebin.com/Kcnht6Ry" rel="nofollow">http://pastebin.com/Kcnht6Ry</a></p>