Files
atap/ATAPAuditor/AuditGroups/Microsoft Windows Server 2022-Microsoft-FINAL#SecurityOptions.ps1
T
2026-05-11 09:15:08 +02:00

27 lines
752 B
PowerShell

[AuditTest] @{
Id = "SecurityOption-226"
Task = "Ensure 'LSAAnonymousNameLookup' is set to '0'"
Test = {
$securityOption = Get-AuditResource "WindowsSecurityPolicy"
$setOption = $securityOption['System Access']["LSAAnonymousNameLookup"]
if ($null -eq $setOption) {
return @{
Message = "Currently not set."
Status = "False"
}
}
if ($setOption -ne 0) {
return @{
Message = "'LSAAnonymousNameLookup' currently set to: $setOption. Expected: 0"
Status = "False"
}
}
return @{
Message = "Compliant"
Status = "True"
}
}
}