PSHTML-AD-Report
PSHTML-AD-Report copied to clipboard
Allow Param to change CSS file to change colors
I used the following in the parameters
#change the color of the tables #Original #FFA500, You must use the hex value [Parameter(ValueFromPipeline = $true, HelpMessage = "Enter the custom color for table background")] [String]$CustomColor = "#FFA500",
Then in the code I added the following to change the sample file included with the module, and save it as 'custom.css'.
((Get-Content -path "C:\Program Files\WindowsPowerShell\Modules\ReportHTML\1.4.1.2\sample.css" -Raw ) -replace '#FFA500', $CustomColor) | Set-Content -Path "C:\Program Files\WindowsPowerShell\Modules\ReportHTML\1.4.1.2\Custom.css"