title: Parse local HTML file
body: <p>I can use PowerShell to parse an HTML page</p>
  
  <pre class="lang-sh prettyprint-override"><code>PS &gt; $foo = Invoke-WebRequest http://example.com
  
  PS &gt; $foo.Links.Count
  1
  </code></pre>
  
  <p>However if I download the page</p>
  
  <pre class="lang-sh prettyprint-override"><code>PS &gt; Invoke-WebRequest -OutFile example.htm http://example.com
  </code></pre>
  
  <p>and then try to parse the downloaded page it gives unexpected result</p>
  
  <pre class="lang-sh prettyprint-override"><code>PS &gt; $foo = Invoke-WebRequest file://$pwd/example.htm
  
  PS &gt; $foo.Links.Count
  0
  </code></pre>
  
  <p>How can I parse the local downloaded page?</p>