This commit is contained in:
fukusuket
2025-04-20 09:48:20 +09:00
parent 9c2fd63688
commit 74c0393993

View File

@@ -1476,14 +1476,15 @@ function AuditFileSize {
} }
# Format-Tableには色つき出力の機能はないので、Write-Hostで色をつける # Format-Tableには色つき出力の機能はないので、Write-Hostで色をつける
Write-Host ("{0,-75} {1,-15} {2,-15} {3,-15} {4,-15} {5,-10}" -f ` $tableLayout = "{0,-75} {1,-15} {2,-15} {3,-15} {4,-15} {5,-10}"
Write-Host ($tableLayout -f `
"Log File Path", ` "Log File Path", `
"Current Size", ` "Current Size", `
"Max Size", ` "Max Size", `
"Default", ` "Default", `
"Recommended", ` "Recommended", `
"Correct Setting") "Correct Setting")
Write-Host ("{0,-75} {1,-15} {2,-15} {3,-15} {4,-15} {5,-10}" -f ` Write-Host ($tableLayout -f `
"-------------", ` "-------------", `
"------------", ` "------------", `
"--------", ` "--------", `
@@ -1492,7 +1493,7 @@ function AuditFileSize {
"--------------") "--------------")
foreach ($result in $results) { foreach ($result in $results) {
$color = if ($result.CorrectSetting -eq "Y") { "Green" } else { "Red" } $color = if ($result.CorrectSetting -eq "Y") { "Green" } else { "Red" }
Write-Host ("{0,-75} {1,-15} {2,-15} {3,-15} {4,-15} {5,-10}" -f ` Write-Host ($tableLayout -f `
$result.LogFilePath, ` $result.LogFilePath, `
$result.CurrentLogSize, ` $result.CurrentLogSize, `
$result.MaxLogSize, ` $result.MaxLogSize, `