mirror of
https://github.com/Yamato-Security/WELA.git
synced 2025-12-06 17:22:50 +01:00
refactor
This commit is contained in:
7
WELA.ps1
7
WELA.ps1
@@ -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, `
|
||||||
|
|||||||
Reference in New Issue
Block a user