def rule(event):
    if any(
        [
            all(
                [
                    "Add-PrinterPort -Name" in event.deep_get("CommandLine", default=""),
                    any(
                        [
                            ".exe" in event.deep_get("CommandLine", default=""),
                            ".dll" in event.deep_get("CommandLine", default=""),
                            ".bat" in event.deep_get("CommandLine", default=""),
                        ]
                    ),
                ]
            ),
            "Generic / Text Only" in event.deep_get("CommandLine", default=""),
        ]
    ):
        return True
    return False
