title: Read html file as string in Powershell
body: <p>I need to read a html file and parse the content to a string</p>
  
  <p>From this</p>
  
  <pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
  
  &lt;head&gt;
      &lt;meta charset="utf-8"&gt;
      &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8"&gt;
      &lt;meta http-equiv="x-ua-compatible" content="ie=edge"&gt;
      &lt;meta name="viewport" content="width=device-width, initial-scale=1"&gt;
      &lt;title&gt;Index&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
      Index
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>To an output like this</p>
  
  <pre><code>$stringValue = "&lt;!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\"&gt;"...
  </code></pre>
  
  <p>I've tried with <code>$stringValue = $htmlFile | ConvertTo-Json</code> but it transforms some characters into new codes (> = <code>u003e</code>) where I want to keep the special characters intact.</p>
  
  <p>Any help is appreciated</p>