def rule(event):
    if any(
        [
            "get-ADPrincipalGroupMembership" in event.deep_get("ScriptBlockText", default=""),
            all(
                [
                    "get-aduser" in event.deep_get("ScriptBlockText", default=""),
                    "-f " in event.deep_get("ScriptBlockText", default=""),
                    "-pr " in event.deep_get("ScriptBlockText", default=""),
                    "DoesNotRequirePreAuth" in event.deep_get("ScriptBlockText", default=""),
                ]
            ),
        ]
    ):
        return True
    return False
