From 6eafbbae0cc6ceb1267996fd74d825070dd935ad Mon Sep 17 00:00:00 2001 From: fukusuket <41001169+fukusuket@users.noreply.github.com> Date: Wed, 12 Mar 2025 00:36:16 +0900 Subject: [PATCH] update --- config/WELA.ps1 | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/config/WELA.ps1 b/config/WELA.ps1 index 47e2dfd4..de7cbe56 100644 --- a/config/WELA.ps1 +++ b/config/WELA.ps1 @@ -2,9 +2,7 @@ $outputFilePath = "auditpol_output.txt" Start-Process -FilePath "cmd.exe" -ArgumentList "/c chcp 437 & auditpol /get /category:* /r > $outputFilePath" -NoNewWindow -Wait $auditpolOutput = Get-Content -Path $outputFilePath -Raw -Write-Output $auditpolOutput -$filteredOutput = $auditpolOutput | Select-String -Pattern '^(?!.*No Auditing).*{.*}$' -AllMatches | ForEach-Object { $_.Matches.Value } -Write-Output $filteredOutput +$filteredOutput = $auditpolOutput | Select-String -NotMatch "No Auditing" $extractedStrings = [System.Collections.Generic.HashSet[string]]::new() $filteredOutput | ForEach-Object { if ($_ -match '{(.*?)}') {