def rule(event):
    if all(
        [
            "New-Object" in event.deep_get("ScriptBlockText", default=""),
            "System.Xml.XmlDocument" in event.deep_get("ScriptBlockText", default=""),
            ".Load" in event.deep_get("ScriptBlockText", default=""),
            any(
                [
                    "IEX " in event.deep_get("ScriptBlockText", default=""),
                    "Invoke-Expression " in event.deep_get("ScriptBlockText", default=""),
                    "Invoke-Command " in event.deep_get("ScriptBlockText", default=""),
                    "ICM -" in event.deep_get("ScriptBlockText", default=""),
                ]
            ),
        ]
    ):
        return True
    return False
