def rule(event):
    if all(
        [
            any(
                [
                    " -ExclusionPath " in event.deep_get("ScriptBlockText", default=""),
                    " -ExclusionExtension " in event.deep_get("ScriptBlockText", default=""),
                    " -ExclusionProcess " in event.deep_get("ScriptBlockText", default=""),
                    " -ExclusionIpAddress " in event.deep_get("ScriptBlockText", default=""),
                ]
            ),
            any(
                [
                    "Add-MpPreference " in event.deep_get("ScriptBlockText", default=""),
                    "Set-MpPreference " in event.deep_get("ScriptBlockText", default=""),
                ]
            ),
        ]
    ):
        return True
    return False
