how to convert your Powershell output to HTML file

Powershell has ability to save a html file for your scripts output.This gives you more flexibility to read and modify data format.

example 1

get-process | convertTo-html | set-content c:\Get-process.htm

This command gives your get-process command output to c:\get-process.htm
______________________

example 2

get-process | convertto-html -title "Get-process for this machine" -body "You can see processes of this machine" | set-content c:\get-processWithbody.htm

We add a title text and a body text to our html.





you can change the format of the html page.
-body "

"
-body " "


http://www.microsoft.com/technet/scriptcenter/topics/msh/cmdlets/convertto-html.mspx