Commit cde9ef3 1 parent cd3293b commit cde9ef3 Copy full SHA for cde9ef3
File tree 1 file changed +1
-4
lines changed
1 file changed +1
-4
lines changed Original file line number Diff line number Diff line change @@ -3,16 +3,13 @@ $outputFilePath = "auditpol_output.txt"
3
3
Start-Process - FilePath " cmd.exe" - ArgumentList " /c chcp 437 & auditpol /get /category:* /r > $outputFilePath " - NoNewWindow - Wait
4
4
$auditpolOutput = Get-Content - Path $outputFilePath
5
5
$filteredOutput = $auditpolOutput | Select-String -NotMatch " No Auditing"
6
- Write-Host " DEBUG2"
7
6
$extractedStrings = [System.Collections.Generic.HashSet [string ]]::new()
8
- Write-Host " DEBUG"
9
7
$filteredOutput | ForEach-Object {
10
8
if ($_ -match ' {(.*?)}' ) {
11
9
$extractedStrings.Add ($matches [1 ])
12
10
}
13
11
}
14
-
15
- Write-Host " Extracted GUIDs:"
12
+ Write-Host $extractedStrings
16
13
17
14
# Step 2: Read the rules from security_rules.json
18
15
$jsonFilePath = " ./config/security_rules.json"
You can’t perform that action at this time.
0 commit comments