mirror of
https://github.com/Yamato-Security/WELA.git
synced 2026-01-23 16:33:32 +01:00
fix: enhance auditing setup with new auditpol configurations and batch script for event log management
This commit is contained in:
4
WELA.ps1
4
WELA.ps1
@@ -5929,11 +5929,9 @@ function ConfigureAuditSettings {
|
||||
if ($proceed) {
|
||||
try {
|
||||
# AuditFilter の設定
|
||||
Start-Process -FilePath "certutil.exe" -ArgumentList "-setreg","CA\AuditFilter","127" -NoNewWindow -Wait
|
||||
|
||||
Start-Process -FilePath "certutil.exe" -ArgumentList "-setreg","CA\AuditFilter","127" -NoNewWindow -Wait -RedirectStandardOutput 'NUL' -RedirectStandardError 'NUL'
|
||||
# 証明書サービスの再起動
|
||||
Restart-Service -Name "CertSvc" -Force -ErrorAction Stop
|
||||
|
||||
# 反映確認
|
||||
$propAfter = Get-ItemProperty -Path $regPath -Name "AuditFilter" -ErrorAction SilentlyContinue
|
||||
$newValue = if ($null -ne $propAfter) { [int]$propAfter.AuditFilter } else { $null }
|
||||
|
||||
Reference in New Issue
Block a user