Contact Info

Crumbtrail » Administration » Powershell » Powershell 2.0 » ConvertTo-Html

ConvertTo-Html - Powershell 2.0 CmdLet

Microsoft Windows PowerShell is a command-line shell and scripting tool based on the Microsoft .NET Framework. It is designed for system administrators, engineers and developers to control and automate the administration of Windows and applications.

More than hundred command-line tools (so called "cmdlets") can be used to perform system administration tasks and Windows Management Instrumentation (WMI). These cmdlets are easy to use, with standard naming conventions and common parameters, and standard tools for piping, sorting, filtering, and formatting data and objects.


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

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

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 spe
    cify the HTML page title, to add text before and after the object, and to return only the table or list fragment, i
    nstead of a strict DTD page.
    When you submit multiple objects to ConvertTo-Html, Windows PowerShell creates the table (or list) based on the pro
    perties of the first object that you submit. If the remaining objects do not have one of the specified properties, 
    the property value of that object is an empty cell. If the remaining objects have additional properties, those prop
    erty values are not included in the file.