title: Output an array to HTML file
body: <p>I have been given a working PowerShell script to modify. This script checks for broken links in a SharePoint web application and reports any broken links it finds. Currently, the script outputs the results to a text file.</p>
  
  <p><strong>Code:</strong></p>
  
  <pre><code>$results | Out-File report.txt
  </code></pre>
  
  <p><strong>Result Format:</strong></p>
  
  <blockquote>
    <p>Name of link list - ID of the item - URL + URL Name - HTTP status code
    - URL</p>
  </blockquote>
  
  <p><strong>Result:</strong></p>
  
  <blockquote>
    <p>Link List 1 - 1 - <a href="http://google.com" rel="nofollow">http://google.com</a>, Google (Good) - 200 -
    <a href="http://google.com" rel="nofollow">http://google.com</a></p>
  </blockquote>
  
  <hr>
  
  <p>However, when I try to use the <code>ConvertTo-HTML</code> function I get a different output:</p>
  
  <p><strong>Code:</strong></p>
  
  <pre><code>$results | ConvertTo-Html | Out-File report.html
  </code></pre>
  
  <p><strong>Result:</strong></p>
  
  <blockquote>
    <p>76</p>
  </blockquote>
  
  <p>Therefore, instead of receiving a string of text I am receiving its length.</p>
  
  <p>What am I doing wrong here?</p>
  
  <p><strong>Note:</strong> </p>
  
  <ul>
  <li><code>results</code> is an array.</li>
  </ul>