feat: check size setting

This commit is contained in:
fukusuket
2025-04-18 14:52:39 +09:00
parent 0d87e79731
commit ebcc05629a

View File

@@ -1463,8 +1463,8 @@ function AuditFileSize {
$logInfo = Get-WinEvent -ListLog $logName -ErrorAction Stop $logInfo = Get-WinEvent -ListLog $logName -ErrorAction Stop
$results += [PSCustomObject]@{ $results += [PSCustomObject]@{
LogFilePath = Split-Path $logInfo.LogFilePath -Leaf LogFilePath = Split-Path $logInfo.LogFilePath -Leaf
CurrentLogSize = "{0} MB" -f ($logInfo.FileSize / 1MB) CurrentLogSize = "{0:N2} MB" -f ($logInfo.FileSize / 1MB)
MaxLogSize = "{0} MB" -f ($logInfo.MaximumSizeInBytes / 1MB) MaxLogSize = "{0:N2} MB" -f ($logInfo.MaximumSizeInBytes / 1MB)
Default = $logNames[$logName][0] # Default = $logNames[$logName][0] #
Recommended = $logNames[$logName][1] # Recommended = $logNames[$logName][1] #
} }