def rule(event):
    if all(
        [
            any(
                [
                    all(
                        [
                            "localgroup " in event.deep_get("CommandLine", default=""),
                            " /add" in event.deep_get("CommandLine", default=""),
                        ]
                    ),
                    all(
                        [
                            "Add-LocalGroupMember " in event.deep_get("CommandLine", default=""),
                            " -Group " in event.deep_get("CommandLine", default=""),
                        ]
                    ),
                ]
            ),
            any(
                [
                    "Group Policy Creator Owners" in event.deep_get("CommandLine", default=""),
                    "Schema Admins" in event.deep_get("CommandLine", default=""),
                ]
            ),
        ]
    ):
        return True
    return False
