diff --git a/WELAVerboseSecAudit.psm1 b/WELAVerboseSecAudit.psm1 index c1fa148f..0248df00 100644 --- a/WELAVerboseSecAudit.psm1 +++ b/WELAVerboseSecAudit.psm1 @@ -233,16 +233,8 @@ System $msgLines = $msg -split "`n" foreach ($line in $msgLines) { - if ($line -match '\$(\w+)') { - $parts = $line -split '(\$\w+)' - foreach ($part in $parts) { - if ($part -match '\$(\w+)') { - Write-Host -NoNewline $part -ForegroundColor Red - } else { - Write-Host -NoNewline $part - } - } - Write-Host "" + if ($line -match '^\s*disabled.*\)$') { + Write-Host -NoNewline $line -ForegroundColor Red } else { Write-Host $line }