def rule(event):
    if all(
        [
            not any(
                [
                    event.deep_get("Image", default="").startswith("C:\\Windows\\System32\\"),
                    event.deep_get("Image", default="").startswith("C:\\Windows\\SysWOW64\\"),
                ]
            ),
            "cmd.exe /c" in event.deep_get("ParentCommandLine", default=""),
            "RoamDiag.cmd" in event.deep_get("ParentCommandLine", default=""),
            "-outputpath" in event.deep_get("ParentCommandLine", default=""),
        ]
    ):
        return True
    return False
