fix: enhance auditing setup with new auditpol configurations and batch script for event log management

This commit is contained in:
fukusuket
2025-11-15 10:27:34 +09:00
parent 7559cfea84
commit 4d93de3bb5

View File

@@ -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 }