Contact Info

Crumbtrail

ActiveXperts.com » Administration » Powershell » Powershell 3.0 » ConvertTo-Html

ConvertTo-Html - Powershell 3.0 CmdLet

ActiveXperts Network Monitor ships with integrated Powershell scripts to monitor complex network. The scripts run out of the box
Download the ActiveXperts Network Monitor FREE version now »

ConvertTo-Html

Short description
Converts Microsoft .NET Framework objects into HTML that can be displayed in a Web browser.

Syntax
ConvertTo-Html [[-Property] <Object[]>] [[-Head] <String[]>] [[-Title] <String>] [[-Body] <String[]>] [-As <String>] [-
CssUri <Uri>] [-InputObject <PSObject>] [-PostContent <String[]>] [-PreContent <String[]>] [<CommonParameters>]
ConvertTo-Html [[-Property] <Object[]>] [-As <String>] [-Fragment] [-InputObject <PSObject>] [-PostContent <String[]>] 
[-PreContent <String[]>] [<CommonParameters>]





Description
The ConvertTo-Html cmdlet converts .NET Framework objects into HTML that can be displayed in a Web browser. You can use
 this cmdlet to display the output of a command in a Web page.


You can use the parameters of ConvertTo-Html to select object properties, to specify a table or list format, to specify
 the HTML page title, to add text before and after the object, and to return only the table or list fragment, instead o
f a strict DTD page.


When you submit multiple objects to ConvertTo-Html, Windows PowerShell creates the table (or list) based on the propert
ies of the first object that you submit. If the remaining objects do not have one of the specified properties, the prop
erty value of that object is an empty cell. If the remaining objects have additional properties, those property values 
are not included in the file.