def rule(event):
    if all(
        [
            any(
                [
                    "Export-PfxCertificate" in event.deep_get("ScriptBlockText", default=""),
                    "Export-Certificate" in event.deep_get("ScriptBlockText", default=""),
                ]
            ),
            not "CmdletsToExport = @(" in event.deep_get("ScriptBlockText", default=""),
        ]
    ):
        return True
    return False
