Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
Sample output

````markdown
# Windows Secure Auditor: 0.0.11
# Windows Secure Auditor: 0.0.12

## System Information

Expand Down
2 changes: 1 addition & 1 deletion README.zh-TW.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
範例輸出

````markdown
# Windows Secure Auditor: 0.0.11
# Windows Secure Auditor: 0.0.12

## 系統資訊

Expand Down
2 changes: 1 addition & 1 deletion SecureAuditor.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# RootModule = ''

# Version number of this module.
ModuleVersion = '0.0.11'
ModuleVersion = '0.0.12'

# Supported PSEditions
# CompatiblePSEditions = @()
Expand Down
10 changes: 6 additions & 4 deletions rules/EventLogs.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ function Test($config) {
if ($events.Count -eq 0) {
return
}
Write-Output "`n## $($i18n.EventLogs)"
Write-Output "`n## $($i18n.EventLogs)`n"
$events = $events | Select-Object Id, Level, LevelDisplayName, LogName, Message | Sort-Object -Property Level, Id | Group-Object -Property Level, Id
$maxEvents = [int]::Parse($config.EventLogs.MaxEvents)
$exclude = $config.EventLogs.Exclude
Expand All @@ -47,10 +47,12 @@ function Test($config) {
}
$level = $event.Group[0].LevelDisplayName
$logName = $event.Group[0].LogName
$message = $event.Group[0].Message.Trim()
$message = $event.Group[0].Message
$count = $event.Count;
Write-Output "`n- $($i18n.Level): $($level), $($i18n.EventId): $($eventId), $($i18n.LogName): $($logName), $($i18n.Count): $($count)"
Write-Output "`n``````log`n$($message)`n``````"
Write-Output "- $($i18n.Level): $($level), $($i18n.EventId): $($eventId), $($i18n.LogName): $($logName), $($i18n.Count): $($count)"
if ($null -ne $message) {
Write-Output "`n``````log`n$($message.Trim())`n```````n"
}
$eventCount += 1
}
}