# .SYNOPSIS Takes input objects, and outputs a sortable HTML table .DESCRIPTION The function requires at least 2 parameters, an input object and a path where the result is to be output to. The function will output 3 files, a css file that determines the way the result is formatted, a javascript file that handles the sorting, and a HTML file that contains the data. .PARAMETER $InputObject Contains the objects that should go into the table. (required) .PARAMETER $OutputFolder The folder where the resulting files should be put, if the folder does not exist it will be created. (required) .PARAMETER $BrowserTitle The name that will show up in the browser title line .PARAMETER $ReportTitle The name of the report on the HTML page .EXAMPLE PS C:\> Out-HTMLTable -$InputObject (Get-process | select Name,Handles) -$OutputFolder c:\Reports .EXAMPLE PS C:\> (Get-process | select Name,Handles) | Out-HTMLTable -$OutputFolder c:\Reports -$BrowserTitle "Very Important Report" .INPUTS Powershell objects .OUTPUTS HTMLTable .NOTES Additional information about the function go here. .LINK about_functions_advanced .LINK about_comment_based_help #> Function Out-HTMLTable { [CmdletBinding()] param( [Parameter(Mandatory=$true,Position=0,ValueFromPipeline=$true)] $InputObject, [Parameter(Mandatory=$true,Position=1)] $OutPutFolder, [Parameter(Mandatory=$false)] $BrowserTitle = "Table Report", [Parameter(Mandatory=$false)] $ReportTitle = "Data" ) begin { [Object[]]$Objects = @() If (!($OutPutFolder.EndsWith("\"))) {$OutPutFolder = $OutPutFolder +"\"} if (!(Test-Path -path $OutputFolder)) { New-Item $OutputFolder -type directory } } process { $Objects += $InputObject } end { $Note = "Number of objects: " + [String](($Objects).Count) $Objects | ConvertTo-Html –body "