Add default file path handling for HTML report generation, fixes #58

This commit is contained in:
Przemyslaw Klys
2024-12-02 22:53:34 +01:00
parent cd72f79f85
commit 642c4844a5
+4 -4
View File
@@ -126,6 +126,10 @@
}
}
if (-not $FilePath) {
$FilePath = Get-FileName -Extension 'html' -Temporary -Name "GpoZaurr"
}
# Build data
foreach ($T in $Script:GPOConfiguration.Keys) {
if ($Script:GPOConfiguration[$T].Enabled -eq $true) {
@@ -201,10 +205,6 @@
if (-not $SplitReports) {
# Generate pretty HTML
$TimeLogHTML = Start-TimeLog
if (-not $FilePath) {
$FilePath = Get-FileName -Extension 'html' -Temporary
}
New-HTMLReportAll -FilePath $FilePath -Online:$Online -HideHTML:$HideHTML -Type $Type
$TimeLogEndHTML = Stop-TimeLog -Time $TimeLogHTML -Option OneLiner