Create HTML report in style

by Jan 28, 2011

Also, here is a template that shows you how to change to a nicer font if you want to export PowerShell results as HTML report.. It will generate a process list and display it in a simple window:

$head = @'


body { font-family:Consolas }


<title>Process List</title>

$path = "$env:temp\report.hta"
Get-Process | Select-Object Name, Company, ID, HandleCount, CPU |
ConvertTo-Html -Head $head -PreContent '<h1>Process List</h1>' | Out-File $path

Invoke-Item $path

Twitter This Tip!
ReTweet this Tip!