def rule(event):
    if all(
        [
            event.deep_get("Image", default="").endswith("\\schtasks.exe"),
            " /create " in event.deep_get("CommandLine", default=""),
            not any(
                [
                    "AUTHORI" in event.deep_get("User", default=""),
                    "AUTORI" in event.deep_get("User", default=""),
                ]
            ),
            not all(
                [
                    event.deep_get("ParentImage", default="")
                    in [
                        "C:\\Program Files\\Microsoft Office\\root\\integration\\integrator.exe",
                        "C:\\Program Files (x86)\\Microsoft Office\\root\\integration\\integrator.exe",
                    ],
                    event.deep_get("Image", default="")
                    in [
                        "C:\\Windows\\System32\\schtasks.exe",
                        "C:\\Windows\\SysWOW64\\schtasks.exe",
                    ],
                    "Microsoft\\Office\\Office Performance Monitor"
                    in event.deep_get("CommandLine", default=""),
                ]
            ),
        ]
    ):
        return True
    return False
