feat: add currentsetting

This commit is contained in:
fukusuket
2025-05-16 18:29:05 +09:00
parent 3daf3bb055
commit 0cd793dbcb

View File

@@ -1586,11 +1586,11 @@ function GuideASD {
$enabled = CheckRegistryValue -registryPath "HKLM:\SOFTWARE\Wow6432Node\Policies\Microsoft\Windows\PowerShell\ModuleLogging" -valueName "EnableModuleLogging" -expectedValue 1
$rules = $all_rules | Where-Object { RuleFilter $_ $eids $channels $guid }
$rules | ForEach-Object { $_.applicable = $enabled }
$current = if ($enabled) { "Enabled" } else { "Disabled" }
$auditResult += [WELA]::New(
"PowerShell",
"Module",
$auditpol[$guid],
$current,
[array]$rules,
"No Auditing",
"Enabled",
@@ -1605,11 +1605,11 @@ function GuideASD {
$enabled = CheckRegistryValue -registryPath "HKLM:\SOFTWARE\Wow6432Node\Policies\Microsoft\Windows\PowerShell\ScriptBlockLogging" -valueName "EnableScriptBlockLogging" -expectedValue 1
$rules = $all_rules | Where-Object { RuleFilter $_ $eids $channels $guid }
$rules | ForEach-Object { $_.applicable = $enabled }
$current = if ($enabled) { "Enabled" } else { "Disabled" }
$auditResult += [WELA]::New(
"PowerShell",
"ScriptBlock",
$auditpol[$guid],
$current,
[array]$rules,
"Patially",
"Enabled",
@@ -2784,11 +2784,11 @@ function GuideMSC {
$enabled = CheckRegistryValue -registryPath "HKLM:\SOFTWARE\Wow6432Node\Policies\Microsoft\Windows\PowerShell\ModuleLogging" -valueName "EnableModuleLogging" -expectedValue 1
$rules = $all_rules | Where-Object { RuleFilter $_ $eids $channels $guid }
$rules | ForEach-Object { $_.applicable = $enabled }
$current = if ($enabled) { "Enabled" } else { "Disabled" }
$auditResult += [WELA]::New(
"PowerShell",
"Module",
$auditpol[$guid],
$current,
[array]$rules,
"No Auditing",
"",
@@ -2803,11 +2803,11 @@ function GuideMSC {
$enabled = CheckRegistryValue -registryPath "HKLM:\SOFTWARE\Wow6432Node\Policies\Microsoft\Windows\PowerShell\ScriptBlockLogging" -valueName "EnableScriptBlockLogging" -expectedValue 1
$rules = $all_rules | Where-Object { RuleFilter $_ $eids $channels $guid }
$rules | ForEach-Object { $_.applicable = $enabled }
$current = if ($enabled) { "Enabled" } else { "Disabled" }
$auditResult += [WELA]::New(
"PowerShell",
"ScriptBlock",
$auditpol[$guid],
$current,
[array]$rules,
"Patially",
"",
@@ -3982,11 +3982,11 @@ function GuideMSS {
$enabled = CheckRegistryValue -registryPath "HKLM:\SOFTWARE\Wow6432Node\Policies\Microsoft\Windows\PowerShell\ModuleLogging" -valueName "EnableModuleLogging" -expectedValue 1
$rules = $all_rules | Where-Object { RuleFilter $_ $eids $channels $guid }
$rules | ForEach-Object { $_.applicable = $enabled }
$current = if ($enabled) { "Enabled" } else { "Disabled" }
$auditResult += [WELA]::New(
"PowerShell",
"Module",
$auditpol[$guid],
$current,
[array]$rules,
"No Auditing",
"",
@@ -4001,11 +4001,11 @@ function GuideMSS {
$enabled = CheckRegistryValue -registryPath "HKLM:\SOFTWARE\Wow6432Node\Policies\Microsoft\Windows\PowerShell\ScriptBlockLogging" -valueName "EnableScriptBlockLogging" -expectedValue 1
$rules = $all_rules | Where-Object { RuleFilter $_ $eids $channels $guid }
$rules | ForEach-Object { $_.applicable = $enabled }
$current = if ($enabled) { "Enabled" } else { "Disabled" }
$auditResult += [WELA]::New(
"PowerShell",
"ScriptBlock",
$auditpol[$guid],
$current,
[array]$rules,
"Patially",
"",