def rule(event):
    if any(
        [
            all(
                [
                    any(
                        [
                            any(
                                [
                                    event.deep_get("Image", default="").endswith(
                                        "\\powershell.exe"
                                    ),
                                    event.deep_get("Image", default="").endswith("\\pwsh.exe"),
                                    event.deep_get("Image", default="").endswith("\\wmic.exe"),
                                    event.deep_get("Image", default="").endswith("\\vssadmin.exe"),
                                    event.deep_get("Image", default="").endswith(
                                        "\\diskshadow.exe"
                                    ),
                                ]
                            ),
                            event.deep_get("OriginalFileName", default="")
                            in [
                                "PowerShell.EXE",
                                "pwsh.dll",
                                "wmic.exe",
                                "VSSADMIN.EXE",
                                "diskshadow.exe",
                            ],
                        ]
                    ),
                    "shadow" in event.deep_get("CommandLine", default=""),
                    "delete" in event.deep_get("CommandLine", default=""),
                ]
            ),
            all(
                [
                    any(
                        [
                            event.deep_get("Image", default="").endswith("\\wbadmin.exe"),
                            event.deep_get("OriginalFileName", default="") == "WBADMIN.EXE",
                        ]
                    ),
                    "delete" in event.deep_get("CommandLine", default=""),
                    "catalog" in event.deep_get("CommandLine", default=""),
                    "quiet" in event.deep_get("CommandLine", default=""),
                ]
            ),
            all(
                [
                    any(
                        [
                            event.deep_get("Image", default="").endswith("\\vssadmin.exe"),
                            event.deep_get("OriginalFileName", default="") == "VSSADMIN.EXE",
                        ]
                    ),
                    "resize" in event.deep_get("CommandLine", default=""),
                    "shadowstorage" in event.deep_get("CommandLine", default=""),
                    any(
                        [
                            "unbounded" in event.deep_get("CommandLine", default=""),
                            "/MaxSize=" in event.deep_get("CommandLine", default=""),
                        ]
                    ),
                ]
            ),
        ]
    ):
        return True
    return False
