add percentage

This commit is contained in:
fukusuket
2025-04-14 09:11:18 +09:00
parent 81634679c5
commit 0d9f72129b

View File

@@ -1044,7 +1044,8 @@ function AuditLogSetting {
$out = "Partially Enabled" $out = "Partially Enabled"
$color = "DarkYellow" $color = "DarkYellow"
} }
Write-Host "$( $_.Name ): $out" -ForegroundColor $color $enabledPercentage = "{0:N2}" -f (($enabledCount / ($enabledCount + $disabledCount)) * 100)
Write-Host "$( $_.Name ): $out($($enabledPercentage)" -ForegroundColor $color
$_.Group | ForEach-Object { $_.Group | ForEach-Object {
$_.Output($outType) $_.Output($outType)
} }