title: Powershell - View Website Source Information
body: <p>There are some websites, such as gmail.com that don't display source information (i.e. you cannot right-click and select "View Source")</p>
  
  <p>So I am trying to read the document source into a file so I can see the different types of elements (I would like to be able to pass credentials and other data into websites eventually), but I'm having difficulty.</p>
  
  <p>Here is the code:</p>
  
  <pre><code>$ie = new-object -com "InternetExplorer.Application"
  $ie.navigate("http://www.gmail.com")
  $ie.visible=$true
  $doc = $ie.document
  Add-Content C:\output.txt $doc.all
  </code></pre>
  
  <p>C:\output.txt is blank, help!</p>