title: In Powershell Use -replace or .replace To Change TD value to a Link
body: <p>I am trying to generate HTML reports of data collected in Powershell. I want to eventually have the HTML link to more specific information about the different elements in the table. In particular, the first column contains names of Virtual Machines, but this isn't particularly important. I am attempting to replace the name value with a link.</p>
  
  <pre><code> for($i=1; $i -le $xml.table.tr.Count-1; $i++){
   $xml.table.tr[$i].td[0].replace($xml.table.tr[$i].td[0],"&lt;a href=`"http://stackoverflow.com`"&gt;myLink&lt;/a&gt;")
   }
  
    $file = Join-Path C:\users\myname\Documents "VMSpecs.html"
  
    ConvertTo-Html -Title "VM Specs" `
    -CssUri C:\Users\myname\Documents\style.css `
    -Body $($xml.InnerXml) | Out-file $file
  
  
   Invoke-item $file
  </code></pre>
  
  <p>Based on the output, the value of $xml.table.tr[$i].td[0] is being replaced with the link information but not permanently. When the file is written to HTML the link information is nowhere to be found, and the original value is still held in the td el</p>
  
  <p>So,big picture, I would like to know how to append a link into html -fragment at a particular location. Any samples or resources be much obliged.</p>