mirror of
https://github.com/EvotecIT/GPOZaurr.git
synced 2026-07-26 11:49:17 +00:00
5d2a4725f1
fix splitreports to start creating reports right away
50 lines
2.3 KiB
PowerShell
50 lines
2.3 KiB
PowerShell
function New-HTMLReportAll {
|
|
[CmdletBinding()]
|
|
param(
|
|
[string] $FilePath,
|
|
[switch] $Online,
|
|
[switch] $HideHTML,
|
|
[Array] $Type
|
|
)
|
|
# Standard reports as requested
|
|
Write-Color -Text '[i]', '[HTML ] ', "Generating HTML report ($FilePath)" -Color Yellow, DarkGray, Yellow
|
|
New-HTML -Author 'Przemysław Kłys @ Evotec' -TitleText 'GPOZaurr Report' {
|
|
New-HTMLTabStyle -BorderRadius 0px -TextTransform capitalize -BackgroundColorActive SlateGrey
|
|
New-HTMLSectionStyle -BorderRadius 0px -HeaderBackGroundColor Grey -RemoveShadow
|
|
New-HTMLPanelStyle -BorderRadius 0px
|
|
New-HTMLTableOption -DataStore JavaScript -BoolAsString -ArrayJoinString ', ' -ArrayJoin
|
|
|
|
New-HTMLHeader {
|
|
New-HTMLSection -Invisible {
|
|
New-HTMLSection {
|
|
New-HTMLText -Text "Report generated on $(Get-Date)" -Color Blue
|
|
} -JustifyContent flex-start -Invisible
|
|
New-HTMLSection {
|
|
New-HTMLText -Text "GPOZaurr - $($Script:Reporting['Version'])" -Color Blue
|
|
} -JustifyContent flex-end -Invisible
|
|
}
|
|
}
|
|
|
|
if ($Type.Count -eq 1) {
|
|
foreach ($T in $Script:GPOConfiguration.Keys) {
|
|
if ($Script:GPOConfiguration[$T].Enabled -eq $true) {
|
|
if ($Script:GPOConfiguration[$T]['Summary']) {
|
|
$Script:Reporting[$T]['Summary'] = Invoke-Command -ScriptBlock $Script:GPOConfiguration[$T]['Summary']
|
|
}
|
|
& $Script:GPOConfiguration[$T]['Solution']
|
|
}
|
|
}
|
|
} else {
|
|
foreach ($T in $Script:GPOConfiguration.Keys) {
|
|
if ($Script:GPOConfiguration[$T].Enabled -eq $true) {
|
|
if ($Script:GPOConfiguration[$T]['Summary']) {
|
|
$Script:Reporting[$T]['Summary'] = Invoke-Command -ScriptBlock $Script:GPOConfiguration[$T]['Summary']
|
|
}
|
|
New-HTMLTab -Name $Script:GPOConfiguration[$T]['Name'] {
|
|
& $Script:GPOConfiguration[$T]['Solution']
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} -Online:$Online.IsPresent -ShowHTML:(-not $HideHTML) -FilePath $FilePath
|
|
} |