chg: remove % when default enabled log

This commit is contained in:
fukusuket
2025-04-15 09:02:20 +09:00
parent f3d20577f1
commit b4edee8eb4

View File

@@ -1388,9 +1388,12 @@ function AuditLogSetting {
} }
$enabledPercentage = "0.00%" $enabledPercentage = "0.00%"
if ($enabledCount + $disabledCount -ne 0) { if ($enabledCount + $disabledCount -ne 0) {
$enabledPercentage = "{0:N2}%" -f (($enabledCount / ($enabledCount + $disabledCount)) * 100) $enabledPercentage = "({0:N2}%)" -f (($enabledCount / ($enabledCount + $disabledCount)) * 100)
} }
Write-Host "$( $_.Name ): $out($($enabledPercentage))" -ForegroundColor $color if ($_.Name -notmatch "Powershell" -and $_.Name -notmatch "Security") {
$enabledPercentage = ""
}
Write-Host "$( $_.Name ): $out$($enabledPercentage)" -ForegroundColor $color
$_.Group | ForEach-Object { $_.Group | ForEach-Object {
$_.Output($outType) $_.Output($outType)
} }