Hope this helps.
#region build html report
$Html = "
<HTML>
<TITLE> LONG RUNNING PROCESSES </TITLE>
<BODY background-color:peachpuff>
<font color =""#B03A2E"" face=""Microsoft Tai le"">
<H1> LONG RUNNING PROCESSES </H1>
</font>
<Table border=1 cellpadding=3 cellspacing=3><br>
<TR bgcolor=#A9CCE3 align=center>
<TD><B>Name</B></TD>
<TD><B>Start Time</B></TD>
<TD><B>Id</B></TD>
<TD><B>Paged Memory Size</TD></B>
<TD><B>Virtual Memory Size</TD></B>
<TD><B>Path</TD></B>
<TD><B>CPU</TD></B>
<TD><B>Virtual Memory Size 64</TD></B>
</TR>
"
#endregion build html report
# detect processes running more than 5 hours
foreach ($proc in (Get-Process)) {
$Html += "<TR><TD align='center' >$($proc.Name)</TD>"
If($proc.StartTime -lt (Get-Date).AddHours(-5)) {
$Html += "<TD align='center' bgcolor=#EC7063>$($proc.StartTime)</TD>"
} else {
$Html += "<TD align='center'>$($proc.StartTime)</TD>"
}
$Html += "<TD align='center' >$($proc.Id)</TD>"
$Html += "<TD align='center' >$($proc.PagedMemorySize)</TD>"
$Html += "<TD align='center' >$($proc.VirtualMemorySize)</TD>"
$Html += "<TD align='center' >$($proc.Path)</TD>"
$Html += "<TD align='center' >$($proc.CPU)</TD>"
$Html += "<TD align='center' >$($proc.VirtualMemorySize64)</TD>"
}
# save the report in current directory
$Html | Out-File .\proc.html