< Back

ConvertTo-NSEnhancedHTML

Mon Jan 13, 2020 9:00 pm

NAME ConvertTo-NSEnhancedHTML



SYNOPSIS

Provides an enhanced version of the ConvertTo-HTML command that includes

inserting an embedded CSS style sheet, JQuery, and JQuery Data Tables for

interactivity. Intended to be used with HTML fragments that are produced

by ConvertTo-NSEnhancedHTMLFragment. This command does not accept pipeline

input.





SYNTAX

ConvertTo-NSEnhancedHTML [-jQueryURI <String>] [-jQueryDataTableURI <String>] [-CssStyleSheet <String[]>] [-Title

<String>] [-PreContent <String>] [-PostContent <String>] -HTMLFragments <String[]> [<CommonParameters>]



ConvertTo-NSEnhancedHTML [-jQueryURI <String>] [-jQueryDataTableURI <String>] [-CssUri <String[]>] [-Title

<String>] [-PreContent <String>] [-PostContent <String>] -HTMLFragments <String[]> [<CommonParameters>]





DESCRIPTION





PARAMETERS

-jQueryURI <String>

A Uniform Resource Indicator (URI) pointing to the location of the

jQuery script file. You can download jQuery from www.jquery.com; you should

host the script file on a local intranet Web server and provide a URI

that starts with http:// or https://. Alternately, you can also provide

a file system path to the script file, although this may create security

issues for the Web browser in some configurations.





Tested with v1.8.2.





Defaults to http://ajax.aspnetcdn.com/ajax/jQuery/j ... 8.2.min.js, which

will pull the file from Microsoft's ASP.NET Content Delivery Network.



Required? false

Position? named

Default value http://ajax.aspnetcdn.com/ajax/jQuery/j ... 8.2.min.js

Accept pipeline input? false

Accept wildcard characters? false



-jQueryDataTableURI <String>

A Uniform Resource Indicator (URI) pointing to the location of the

jQuery Data Table script file. You can download this from www.datatables.net;

you should host the script file on a local intranet Web server and provide a URI

that starts with http:// or https://. Alternately, you can also provide

a file system path to the script file, although this may create security

issues for the Web browser in some configurations.





Tested with jQuery DataTable v1.9.4





Defaults to http://ajax.aspnetcdn.com/ajax/jquery.d ... les.min.js,

which will pull the file from Microsoft's ASP.NET Content Delivery Network.



Required? false

Position? named

Default value http://ajax.aspnetcdn.com/ajax/jquery.d ... les.min.js

Accept pipeline input? false

Accept wildcard characters? false



-CssStyleSheet <String[]>

The CSS style sheet content - not a file name. If you have a CSS file,

you can load it into this parameter as follows:





-CSSStyleSheet (Get-Content MyCSSFile.css)





Alternately, you may link to a Web server-hosted CSS file by using the

-CssUri parameter.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-CssUri <String[]>

A Uniform Resource Indicator (URI) to a Web server-hosted CSS file.

Must start with either http:// or https://. If you omit this, you

can still provide an embedded style sheet, which makes the resulting

HTML page more standalone. To provide an embedded style sheet, use

the -CSSStyleSheet parameter.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Title <String>

A plain-text title that will be displayed in the Web browser's window

title bar. Note that not all browsers will display this.



Required? false

Position? named

Default value Report

Accept pipeline input? false

Accept wildcard characters? false



-PreContent <String>

Raw HTML to insert before all HTML fragments. Use this to specify a main

title for the report:





-PreContent "<H1>My HTML Report</H1>"



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-PostContent <String>

Raw HTML to insert after all HTML fragments. Use this to specify a

report footer:





-PostContent "Created on $(Get-Date)"



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-HTMLFragments <String[]>

One or more HTML fragments, as produced by ConvertTo-NSEnhancedHTMLFragment.





-HTMLFragments $part1,$part2,$part3



Required? true

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS





RELATED LINKS