def rule(event):
    if any(
        [
            any(
                [
                    "get-localgroup " in event.deep_get("ScriptBlockText", default=""),
                    "get-localgroupmember " in event.deep_get("ScriptBlockText", default=""),
                ]
            ),
            all(
                [
                    any(
                        [
                            "get-wmiobject " in event.deep_get("ScriptBlockText", default=""),
                            "gwmi " in event.deep_get("ScriptBlockText", default=""),
                            "get-ciminstance " in event.deep_get("ScriptBlockText", default=""),
                            "gcim " in event.deep_get("ScriptBlockText", default=""),
                        ]
                    ),
                    "win32_group" in event.deep_get("ScriptBlockText", default=""),
                ]
            ),
        ]
    ):
        return True
    return False
